Public report — cesium, published 1 Oct 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_bda44124f68446f88a001b4dba1e663c Filed 1 October 2026, 22:26 UTC Public

CesiumGS/cesium

Measured 1 October 2026, 21:54 UTC

35% Weak
CriticalWeakAdequateStrongExemplary

Large · 425,327 LoC · 7 projects · rebuild ~4.3 person-years · weakest lens: Readiness (28%)

Findings by grade

460 critical 1748 serious 51 minor 34 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
1 October 2026, 21:54 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

54/58dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
2220findings with an exact file:lineof 2259 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
58/132dimensions across the health lenses425327 LoC · 7 projects — wide & deep
Chapters

Executive summary

This system is a large, valuable asset currently operating with significant operational fragility. With an overall health score of 35%, the organization holds a substantial investment—requiring approximately 4.3 person-years to rebuild—that is exposed to high risk due to weak operational readiness. While the codebase is substantial, its current state threatens delivery speed and reliability, demanding immediate attention to stabilize the foundation before further expansion.

The most critical vulnerability lies in operational readiness, which sits at a dangerously low 28%. For a system of this scale, this gap means the team lacks the necessary safeguards to ensure safe, predictable releases. The risk here is not just technical debt but direct business exposure: without robust testing and observability, every deployment carries a heightened probability of outage or regression. This weakness undermines confidence in the system’s ability to support business continuity, making it the primary barrier to reliable service delivery.

Compounding this risk is a pervasive velocity tax across the codebase. Average code quality signals suggest that modifications in weaker areas cost 6–14% more effort than in clean code. This inefficiency acts as a silent drain on resources, slowing down feature development and increasing long-term maintenance costs. Over time, this drag compounds, meaning that every new change becomes progressively more expensive and time-consuming, eroding the team’s ability to respond quickly to market demands.

Despite these challenges, the system retains structural integrity in its architecture and domain modeling, providing a solid base for remediation. The highest-leverage action is to adopt standardized logging practices, such as pino or winston, across all services. This single step offers the fastest return on investment, paying for itself within months by reducing debugging time and improving incident response. Focusing here first stabilizes operations and creates the visibility needed to address deeper code quality issues systematically.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 28% · 46% weightAccessibility 31% · 25% weightSecurity 43% · 14% weightCode Health 53% · 8% weightPerformance 60% · 4% weightArchitecture 60% · 2% weightMaturity 62% · 1% weight

Raise Readiness 28 → 70 (the Healthy floor) ⇒ headline 35 → ~42.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

482 finding(s) are new versus the previous scan (2026-09-16) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · BillboardCollection.BillboardCollection.update (cyclomatic 109) packages/engine/Source/Scene/BillboardCollection.js
  • D1 · Expression.Node.getShaderExpression (cyclomatic 90) REDACTED
  • D1 · PolygonGeometry.computeAttributes (cyclomatic 73) packages/core/Source/PolygonGeometry.js
  • D1 · JulianDate.fromIso8601 (cyclomatic 69) packages/core/Source/JulianDate.js
  • D1 · EllipsoidGeometry.EllipsoidGeometry.createGeometry (cyclomatic 69) packages/core/Source/EllipsoidGeometry.js
  • D1 · PointPrimitiveCollection.PointPrimitiveCollection.update (cyclomatic 64) packages/engine/Source/Scene/PointPrimitiveCollection.js
  • D1 · RectangleGeometry.constructExtrudedRectangle (cyclomatic 60) packages/core/Source/RectangleGeometry.js
  • D1 · HeightmapTessellator.HeightmapTessellator.computeVertices (cyclomatic 50) packages/engine/Source/Core/HeightmapTessellator.js
  • D1 · ImageryLayer.ImageryLayer._createTileImagerySkeletons (cyclomatic 44) packages/engine/Source/Scene/ImageryLayer.js
  • D1 · PathVisualizer.PolylineUpdater.updateObject (cyclomatic 44) packages/engine/Source/DataSources/PathVisualizer.js
  • D1 · EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry (cyclomatic 42) packages/core/Source/EllipsoidOutlineGeometry.js
  • D1 · EllipseGeometry.computeTopBottomAttributes (cyclomatic 40) packages/core/Source/EllipseGeometry.js
  • D1 · CylinderGeometry.CylinderGeometry.createGeometry (cyclomatic 40) packages/core/Source/CylinderGeometry.js
  • D1 · PolylineGeometry.PolylineGeometry.createGeometry (cyclomatic 39) packages/core/Source/PolylineGeometry.js
  • D1 · TimeIntervalCollection.TimeIntervalCollection.addInterval (cyclomatic 38) packages/core/Source/TimeIntervalCollection.js
  • D1 · EllipsoidPrimitive.EllipsoidPrimitive.update (cyclomatic 38) packages/engine/Source/Scene/EllipsoidPrimitive.js
  • D1 · StaticGeometryColorBatch.Batch.update (cyclomatic 37) packages/engine/Source/DataSources/StaticGeometryColorBatch.js
  • D1 · Timeline.Timeline._makeTics (cyclomatic 36) packages/widgets/Source/Timeline/Timeline.js
  • D1 · ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline (cyclomatic 34) packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js
  • D1 · publish.publish (cyclomatic 33) Tools/jsdoc/cesium_template/publish.js
  • D1 · Resource.Resource._Implementations.loadWithXhr (cyclomatic 33) packages/engine/Source/Core/Resource.js
  • D1 · ModelAnimationCollection.ModelAnimationCollection.update (cyclomatic 33) packages/engine/Source/Scene/Model/ModelAnimationCollection.js
  • D1 · PolylineCollection.PolylineCollection.update (cyclomatic 33) packages/engine/Source/Scene/PolylineCollection.js
  • D1 · Scene.Scene.updateEnvironment (cyclomatic 33) packages/engine/Source/Scene/Scene.js
  • D1 · TimeIntervalCollection.TimeIntervalCollection.removeInterval (cyclomatic 32) packages/core/Source/TimeIntervalCollection.js
  • D1 · Vector3DTilePoints.Vector3DTilePoints.applyStyle (cyclomatic 32) packages/engine/Source/Scene/Vector3DTilePoints.js
  • D1 · CorridorGeometry.combine (cyclomatic 31) packages/core/Source/CorridorGeometry.js
  • D1 · PixelFormat.PixelFormat.toInternalFormat (cyclomatic 31) packages/core/Source/PixelFormat.js
  • D1 · RectangleGeometry.constructRectangle (cyclomatic 31) packages/core/Source/RectangleGeometry.js
  • D1 · PolylineCollection.PolylineBucket.write (cyclomatic 31) packages/engine/Source/Scene/PolylineCollection.js
  • D1 · InvertClassification.InvertClassification.update (cyclomatic 30) packages/engine/Source/Scene/InvertClassification.js
  • D1 · ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader (cyclomatic 30) packages/engine/Source/Scene/ShadowMapShader.js
  • D1 · PostProcessStageCollection.PostProcessStageCollection.update (cyclomatic 30) packages/engine/Source/Scene/PostProcessStageCollection.js
  • D1 · TimeDynamicPointCloud.TimeDynamicPointCloud.update (cyclomatic 30) packages/engine/Source/Scene/TimeDynamicPointCloud.js
  • D1 · GeometryPipeline.GeometryPipeline.compressVertices (cyclomatic 29) packages/core/Source/GeometryPipeline.js
  • D1 · ImageBasedLighting.ImageBasedLighting.update (cyclomatic 29) packages/engine/Source/Scene/ImageBasedLighting.js
  • D1 · FramebufferManager.FramebufferManager.destroy (cyclomatic 29) packages/engine/Source/Renderer/FramebufferManager.js
  • D1 · Tipsify.Tipsify.tipsify (cyclomatic 28) packages/core/Source/Tipsify.js
  • D1 · WallGeometry.WallGeometry.createGeometry (cyclomatic 28) packages/core/Source/WallGeometry.js
  • D1 · PolylineCollection.PolylineBucket.writeUpdate (cyclomatic 28) packages/engine/Source/Scene/PolylineCollection.js
  • D1 · StaticGeometryPerMaterialBatch.Batch.update (cyclomatic 28) packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js
  • D1 · StaticOutlineGeometryBatch.Batch.update (cyclomatic 28) packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js
  • D1 · View.View.createPotentiallyVisibleSet (cyclomatic 28) packages/engine/Source/Scene/View.js
  • D1 · Scene.Scene.destroy (cyclomatic 28) packages/engine/Source/Scene/Scene.js
  • D1 · EllipseGeometry.computeWallAttributes (cyclomatic 27) packages/core/Source/EllipseGeometry.js
  • D1 · GroundPolylineGeometry.GroundPolylineGeometry.createGeometry (cyclomatic 27) packages/engine/Source/Core/GroundPolylineGeometry.js
  • D1 · SampledProperty.SampledProperty.getValue (cyclomatic 27) packages/engine/Source/DataSources/SampledProperty.js
  • D1 · PointVisualizer.PointVisualizer.update (cyclomatic 27) packages/engine/Source/DataSources/PointVisualizer.js
  • D1 · I3SGeometry.I3SGeometry._generateGltf (cyclomatic 27) packages/engine/Source/Scene/I3SGeometry.js
  • D1 · OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo (cyclomatic 26) packages/core/Source/OrientedBoundingBox.js
  • D1 · CorridorGeometry.extrudedAttributes (cyclomatic 26) packages/core/Source/CorridorGeometry.js
  • D1 · Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold (cyclomatic 26) packages/core/Source/Intersections2D.js
  • D1 · GroundPrimitive.GroundPrimitive.update (cyclomatic 26) packages/engine/Source/Scene/GroundPrimitive.js
  • D1 · ModelVisualizer.ModelVisualizer.update (cyclomatic 26) packages/engine/Source/DataSources/ModelVisualizer.js
  • D1 · GeometryPipeline.splitLongitudePolyline (cyclomatic 25) packages/core/Source/GeometryPipeline.js
  • D1 · MaterialPipelineStage.MaterialPipelineStage.process (cyclomatic 25) packages/engine/Source/Scene/Model/MaterialPipelineStage.js
  • D1 · PointCloud.PointCloud.update (cyclomatic 25) REDACTED
  • D1 · test (cyclomatic 25) REDACTED
  • D1 · GeometryUpdater.GeometryUpdater._onEntityPropertyChanged (cyclomatic 24) packages/engine/Source/DataSources/GeometryUpdater.js
  • D1 · Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands (cyclomatic 24) REDACTED
  • D1 · QuarticRealPolynomial.neumark (cyclomatic 23) packages/core/Source/QuarticRealPolynomial.js
  • D1 · PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry (cyclomatic 23) packages/core/Source/PolygonGeometryLibrary.js
  • D1 · CoplanarPolygonGeometry.createGeometryFromPolygon (cyclomatic 23) packages/core/Source/CoplanarPolygonGeometry.js
  • D1 · SimplePolylineGeometry.SimplePolylineGeometry.createGeometry (cyclomatic 23) packages/core/Source/SimplePolylineGeometry.js
  • D1 · GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry (cyclomatic 23) packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
  • D1 · StaticGroundPolylinePerMaterialBatch.Batch.update (cyclomatic 23) packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js
  • D1 · Camera.Camera._updateCameraChanged (cyclomatic 23) packages/engine/Source/Scene/Camera.js
  • D1 · CubeMapPanorama.CubeMapPanorama.update (cyclomatic 23) packages/engine/Source/Scene/CubeMapPanorama.js
  • D1 · OIT.OIT.update (cyclomatic 23) packages/engine/Source/Scene/OIT.js
  • D1 · PostProcessStageTextureCache.PostProcessStageTextureCache.update (cyclomatic 23) packages/engine/Source/Scene/PostProcessStageTextureCache.js
  • D1 · I3SNode.I3SNode._create3DTileDefinition (cyclomatic 23) packages/engine/Source/Scene/I3SNode.js
  • D1 · wirePolygon (cyclomatic 23) packages/core/Source/PolygonGeometryLibrary.js
  • D1 · QuarticRealPolynomial.original (cyclomatic 22) packages/core/Source/QuarticRealPolynomial.js
  • D1 · PntsParser.PntsParser.parse (cyclomatic 22) packages/engine/Source/Scene/PntsParser.js
  • D1 · StaticGroundGeometryColorBatch.Batch.update (cyclomatic 22) packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js
  • D1 · CameraFlightPath.CameraFlightPath.createTween (cyclomatic 22) packages/engine/Source/Scene/CameraFlightPath.js
  • D1 · PostProcessStageCollection.PostProcessStageCollection.execute (cyclomatic 22) packages/engine/Source/Scene/PostProcessStageCollection.js
  • D1 · Scene.Scene.updateDerivedCommands (cyclomatic 22) packages/engine/Source/Scene/Scene.js
  • D1 · PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy (cyclomatic 21) packages/core/Source/PolygonGeometryLibrary.js
  • D1 · TimeInterval.TimeInterval.intersect (cyclomatic 21) packages/core/Source/TimeInterval.js
  • D1 · Expression.Node._evaluateTimes (cyclomatic 21) REDACTED
  • D1 · FramebufferManager.FramebufferManager.update (cyclomatic 21) packages/engine/Source/Renderer/FramebufferManager.js
  • D1 · TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess (cyclomatic 21) packages/engine/Source/Scene/TileMapServiceImageryProvider.js
  • D1 · PathVisualizer.PathVisualizer.update (cyclomatic 21) packages/engine/Source/DataSources/PathVisualizer.js
  • D1 · Viewer.Viewer.resize (cyclomatic 21) packages/widgets/Source/Viewer/Viewer.js
  • D1 · PolygonGeometry (cyclomatic 21) packages/core/Source/PolygonGeometry.js
  • D1 · GeometryPipeline.splitLongitudeTriangles (cyclomatic 20) packages/core/Source/GeometryPipeline.js
  • D1 · PolygonGeometry.PolygonGeometry.createGeometry (cyclomatic 20) packages/core/Source/PolygonGeometry.js
  • D1 · Buffer.Buffer.copyFromBuffer (cyclomatic 20) packages/engine/Source/Renderer/Buffer.js
  • D1 · GroundPolylinePrimitive.GroundPolylinePrimitive.update (cyclomatic 20) packages/engine/Source/Scene/GroundPolylinePrimitive.js
  • D1 · VoxelPrimitive.VoxelPrimitive.update (cyclomatic 20) packages/engine/Source/Scene/VoxelPrimitive.js
  • D1 · fromRectangle (cyclomatic 20) packages/core/Source/OrientedBoundingBox.js
  • D1 · CubicRealPolynomial.CubicRealPolynomial.computeRealRoots (cyclomatic 19) packages/core/Source/CubicRealPolynomial.js
  • D1 · BoundingSphere.fromEncodedCartesianVertices (cyclomatic 19) packages/core/Source/BoundingSphere.js
  • D1 · GeometryPipeline.combineGeometries (cyclomatic 19) packages/core/Source/GeometryPipeline.js
  • D1 · GeometryPipeline.computeTriangleAttributes (cyclomatic 19) packages/core/Source/GeometryPipeline.js
  • D1 · PolylineVolumeGeometry.computeAttributes (cyclomatic 19) packages/core/Source/PolylineVolumeGeometry.js
  • D1 · TimeIntervalCollection.parseDuration (cyclomatic 19) packages/core/Source/TimeIntervalCollection.js
  • D1 · EntityCluster.EntityCluster.update (cyclomatic 19) packages/engine/Source/DataSources/EntityCluster.js
  • D1 · StaticGroundGeometryPerMaterialBatch.Batch.update (cyclomatic 19) packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €210,000–€1,000,000
Cost to rebuild€210,000–€1,000,000 (2.1–6.6 person-years (3,481–11,042 h), ~2–9 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 35% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~4.3 person-years of build effort (about ~€630,000 to rebuild). Its weakest lens is Readiness at 28% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Adopt pino (or winston) and log at meaningful points in the services you run.
+7.0 pts · Medium effort · Observability
2
Add tests that import the unreached modules (directly or through their public entry).
+7.0 pts · Medium effort · Test Coverage
3
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
+7.0 pts · Medium effort · Dependency Hygiene

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~4.3 person-years to rebuild), and its weakest lens is Readiness at 28%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~4.3 person-years rebuild (425,327 LoC) · weakest lens: Readiness 28%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 33.3–199.6 engineer-days every year, paid as drag on the ~219,750 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–4 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 6–14% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 54,185 line(s) changed over a 90-day window ⇒ ~219,750/year · D1/D2/D6 code quality: averaging 5.6/10 ⇒ a 6–14% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 4 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Adopt pino (or winston) and log at meaningful points in the services you run. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Adopt pino (or winston) and log at meaningful points in the services you run.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.6/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 6–14% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D6 code quality: averaging 5.6/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

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 @cesium/core core @cesium/engine engine @cesium/engine->@cesium/core @cesium/sandcastle sandcastle @cesium/widgets widgets @cesium/widgets->@cesium/core @cesium/widgets->@cesium/engine cesium cesium rollup-plugin-strip-pragma rollup-plugin-strip-pragma

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

421 modules, 65 dependencies. Every dependency points down the layering — no cycles.

Showing the 40 most-connected modules; 381 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 packages.core.Source.Cartesian32 packages.engine.Source.Scene.BufferPrimitive3 packages.engine.Source.Scene.BufferPrimitiveCollection4 packages.engine.Source.Scene.BufferPrimitiveMaterial5 packages.engine.Source.Scene.ResourceLoader6 packages.sandcastle.src.copilot.ai.types7 packages.sandcastle.src.util.ConsoleWrapper8 Specs9 packages.engine.Source.Scene.BufferLoader10 packages.engine.Source.Scene.BufferPoint11 packages.engine.Source.Scene.BufferPointCollection12 packages.engine.Source.Scene.BufferPointMaterial13 packages.engine.Source.Scene.BufferPolygon14 packages.engine.Source.Scene.BufferPolygonCollection15 packages.engine.Source.Scene.BufferPolygonMaterial16 packages.engine.Source.Scene.BufferPolyline17 packages.engine.Source.Scene.BufferPolylineCollection18 packages.engine.Source.Scene.BufferPolylineMaterial19 packages.engine.Source.Scene.GltfBufferViewLoader20 packages.engine.Source.Scene.GltfDracoLoader21 packages.engine.Source.Scene.GltfImageLoader22 packages.engine.Source.Scene.GltfIndexBufferLoader23 packages.engine.Source.Scene.GltfJsonLoader24 packages.engine.Source.Scene.GltfLoader25 packages.engine.Source.Scene.GltfSpzLoader26 packages.sandcastle.src.copilot.ChatMessage27 packages.sandcastle.src.copilot.ChatPanel28 packages.sandcastle.src.copilot.ToolCallDisplay29 packages.sandcastle.src.copilot.ai.clients30 packages.sandcastle.src.copilot.ai.clients.AIClientFactory31 packages.sandcastle.src.copilot.ai.diff.DiffMatcher32 packages.sandcastle.src.copilot.ai.tools.toolRegistry33 packages.sandcastle.src.copilot.contexts.ModelContext34 packages.sandcastle.src.copilot.hooks.useToolChainExecution35 packages.sandcastle.src.copilot.integrations.ConsoleChatAction36 packages.sandcastle.src.copilot37 packages.sandcastle.src.copilot.ai.clients.VertexAIClient38 packages.sandcastle.src.copilot.ai.diff.RooStyleDiffStrategy39 packages.sandcastle.src.copilot.contexts40 packages.sandcastle.src.copilot.hooks
1 packages.core.Source.Cartesian3
2 packages.engine.Source.Scene.BufferPrimitive
3 packages.engine.Source.Scene.BufferPrimitiveCollection
4 packages.engine.Source.Scene.BufferPrimitiveMaterial
5 packages.engine.Source.Scene.ResourceLoader
6 packages.sandcastle.src.copilot.ai.types
7 packages.sandcastle.src.util.ConsoleWrapper
8 Specs1
9 packages.engine.Source.Scene.BufferLoader1
10 packages.engine.Source.Scene.BufferPoint1
11 packages.engine.Source.Scene.BufferPointCollection1
12 packages.engine.Source.Scene.BufferPointMaterial1
13 packages.engine.Source.Scene.BufferPolygon1
14 packages.engine.Source.Scene.BufferPolygonCollection1
15 packages.engine.Source.Scene.BufferPolygonMaterial1
16 packages.engine.Source.Scene.BufferPolyline1
17 packages.engine.Source.Scene.BufferPolylineCollection1
18 packages.engine.Source.Scene.BufferPolylineMaterial1
19 packages.engine.Source.Scene.GltfBufferViewLoader1
20 packages.engine.Source.Scene.GltfDracoLoader1
21 packages.engine.Source.Scene.GltfImageLoader1
22 packages.engine.Source.Scene.GltfIndexBufferLoader1
23 packages.engine.Source.Scene.GltfJsonLoader1
24 packages.engine.Source.Scene.GltfLoader1
25 packages.engine.Source.Scene.GltfSpzLoader1
26 packages.sandcastle.src.copilot.ChatMessage1
27 packages.sandcastle.src.copilot.ChatPanel1
28 packages.sandcastle.src.copilot.ToolCallDisplay1
29 packages.sandcastle.src.copilot.ai.clients1
30 packages.sandcastle.src.copilot.ai.clients.AIClientFactory9
31 packages.sandcastle.src.copilot.ai.diff.DiffMatcher3
32 packages.sandcastle.src.copilot.ai.tools.toolRegistry4
33 packages.sandcastle.src.copilot.contexts.ModelContext2
34 packages.sandcastle.src.copilot.hooks.useToolChainExecution1
35 packages.sandcastle.src.copilot.integrations.ConsoleChatAction1
36 packages.sandcastle.src.copilot1111
37 packages.sandcastle.src.copilot.ai.clients.VertexAIClient81
38 packages.sandcastle.src.copilot.ai.diff.RooStyleDiffStrategy21
39 packages.sandcastle.src.copilot.contexts11
40 packages.sandcastle.src.copilot.hooks1
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…ore.Source.Cartesian3…Scene.BufferPrimitive…erPrimitiveCollection…fferPrimitiveMaterial….Scene.ResourceLoader….src.copilot.ai.types…c.util.ConsoleWrapperSpecs…ce.Scene.BufferLoader…rce.Scene.BufferPoint…BufferPointCollection…e.BufferPointMaterial…e.Scene.BufferPolygon…fferPolygonCollection…BufferPolygonMaterial….Scene.BufferPolyline…ferPolylineCollection…ufferPolylineMaterial….GltfBufferViewLoader…Scene.GltfDracoLoader…Scene.GltfImageLoader…GltfIndexBufferLoader….Scene.GltfJsonLoader…urce.Scene.GltfLoader…e.Scene.GltfSpzLoader…c.copilot.ChatMessage…src.copilot.ChatPanel…pilot.ToolCallDisplay…rc.copilot.ai.clients…ients.AIClientFactory…t.ai.diff.DiffMatcher…ai.tools.toolRegistry…contexts.ModelContext…useToolChainExecution…ons.ConsoleChatAction…andcastle.src.copilot…lients.VertexAIClient….RooStyleDiffStrategy….src.copilot.contexts…tle.src.copilot.hooks…ore.Source.Cartesian31…Scene.BufferPrimitive2…erPrimitiveCollection3…fferPrimitiveMaterial4….Scene.ResourceLoader5….src.copilot.ai.types6…c.util.ConsoleWrapper7Specs8…ce.Scene.BufferLoader9…rce.Scene.BufferPoint10…BufferPointCollection11…e.BufferPointMaterial12…e.Scene.BufferPolygon13…fferPolygonCollection14…BufferPolygonMaterial15….Scene.BufferPolyline16…ferPolylineCollection17…ufferPolylineMaterial18….GltfBufferViewLoader19…Scene.GltfDracoLoader20…Scene.GltfImageLoader21…GltfIndexBufferLoader22….Scene.GltfJsonLoader23…urce.Scene.GltfLoader24…e.Scene.GltfSpzLoader25…c.copilot.ChatMessage26…src.copilot.ChatPanel27…pilot.ToolCallDisplay28…rc.copilot.ai.clients29…ients.AIClientFactory30…t.ai.diff.DiffMatcher31…ai.tools.toolRegistry32…contexts.ModelContext33…useToolChainExecution34…ons.ConsoleChatAction35…andcastle.src.copilot36…lients.VertexAIClient37….RooStyleDiffStrategy38….src.copilot.contexts39…tle.src.copilot.hooks40111111111111111111111193421111118121111+381 more modules (most-connected shown)

At a glance — Code Health · 53% · Adequate · gated by D2, D3, R3 ·

At a glance — Architecture · 60% · Adequate · gated by D26, R9 ·

At a glance — Maturity · 62% · Adequate · gated by M2 ·

At a glance — Readiness · 28% · Weak · gated by R4, R8, P2, P3, P7 ·

At a glance — Security · 43% · Weak · gated by D28, D29, D36 ·

At a glance — Accessibility · 31% · Weak · gated by AC1, AC2, AC4 ·

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
A02:2021 — Cryptographic Failures303High / Critical
A03:2021 — Injection47High / Critical
A06:2021 — Vulnerable & Outdated Components2Medium

Roadmap

First, establish observability by adopting a standard logging library and instrumenting services with meaningful logs, health checks, and tracing. Next, improve test coverage by adding tests for currently unreached production modules and clean up dependencies by removing unused packages and correctly categorizing type- and test-only dependencies. Then, integrate static analysis security testing into the CI pipeline to prevent security regressions from being merged. Finally, harden outbound HTTP calls by enforcing timeouts, implementing retries with back-off, and adding circuit breakers to manage failures.

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

Do thisHelpsEffortDimension
Adopt pino (or winston) and log at meaningful points in the services you run.+7.0 ptsMediumObservability
Add tests that import the unreached modules (directly or through their public entry).+7.0 ptsMediumTest Coverage
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+7.0 ptsMediumDependency Hygiene
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.+7.0 ptsMediumSecurity & performance tooling
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.+7.0 ptsMediumOutbound HTTP resilience
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.+6.7 ptsMediumDeployment & Rollback
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+5.5 ptsMediumText alternatives
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+5.5 ptsMediumForms & labels

File quality

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

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.5MixedSecrets (history): REDACTED: REDACTED
REDACTED4.5MixedSecrets (history): REDACTED: REDACTED
REDACTED4.6MixedSecrets (history): REDACTED: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
packages/sandcastle/src/App.tsx4.9MixedCyclomatic Complexity: App.App (cyclomatic 57)
REDACTED5.0MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedSecrets (history): REDACTED: 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 — 460

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

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

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

Could not be resolved — 34

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. 54 of 58 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — 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 — 58 dimensions across the health lenses
D1D2D3D5D6D9D10D13D15D16D17D19D20D21D26D28D29D30D34D35D36D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R11R2R3R4R6R7R8R9X24X25X29

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, 2220 of 2259 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

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

Every finding is locatable in findings.md. Run 01a0f976-a34b-7195-9db6-d1827cbbb198.

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 MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — the repository root (karma/@playwright/test) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • 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 14,575 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 3 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py, .ts, .js, .mjs, .cjs) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 5 package.json manifest(s) WERE read and their pinning discipline assessed; what went unanswered is the currency half, because answering it needs a lockfile resolved to CONCRETE versions and this repository commits none — a package.json states version RANGES, and a range names no particular release to be behind. So registry.npmjs.org was never asked, and there was nothing here for it to grade. This is a true statement about the repository and NOT a gap on our side: no lockfile reader we could write would find anything here to read, so there is no capability behind this row to build.
  • D14 License Compliance — 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. Not scored — this repository declares package.json manifests but commits no lockfile this pass can resolve (npm, pnpm, yarn and bun each write a different one, and `bun.lockb` is a binary format with no published shape), so the set of packages it actually ships is not resolvable from the checkout: its declarations carry version RANGES, and grading whichever release happens to be newest today would be a verdict about a dependency graph this repository has not pinned. Commit the lock and this dimension grades its production dependencies against registry.npmjs.org. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
  • D22 Internal API Consistency — 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. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (package.json), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D30 Dependency Vulnerabilities — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; REDACTED was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that REDACTED is free of known-vulnerable dependencies.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/engine/Source/Scene/ScreenSpaceCameraController.js`, `packages/engine/Specs/DataSources/CzmlDataSourceSpec.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.
  • D43 Malicious Dependencies — measured, with a gap in what it reached — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; REDACTED was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that REDACTED is free of known-vulnerable dependencies.
  • AC2 Forms & labels — 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. 315 further occurrence(s) are not listed individually; the score already reflects all 355.
  • AC3 Page structure — 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. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
  • AX6 Interface segregation — 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 check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C2 Access Controls — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — 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 check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • R10 Code Duplication — 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. 1506 further occurrence(s) are not listed individually; the score already reflects all 1546.
  • R4 Test Coverage — 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. 1449 further occurrence(s) are not listed individually; the score already reflects all 1489.
  • S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 check reads C# syntax, and Java and Rust source only, and no C# was loaded and no Java or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — 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 check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — 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 check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — 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 check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 23 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

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

559 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ChatPanel.ChatPanel at 114. A further 15 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 KmlDataSource.processScreenOverlay at 32 — they are counted neither in the figure above nor in this dimension's score. 4 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: packages/engine/Source/Renderer/createUniform.js (createUniform.createUniform at 20), packages/engine/Source/Scene/Billboard.js (Billboard.Billboard.equals at 20), packages/core/Source/Matrix4.js (Matrix4.equals at 19), packages/engine/Source/Renderer/createUniformArray.js (createUniformArray.createUniformArray at 19). 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.

update (cyclomatic 42) · ×2packages/engine/Source/Scene/Primitive.js:2083
ChatPanel.ChatPanel (cyclomatic 114)packages/sandcastle/src/copilot/ChatPanel.tsx:152
BillboardCollection.BillboardCollection.update (cyclomatic 109)packages/engine/Source/Scene/BillboardCollection.js:1569
addDrawCommandsForTile (cyclomatic 107)packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510
RenderState (cyclomatic 96)packages/engine/Source/Renderer/RenderState.js:93

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

What to do

  1. Resolve the 2 update (cyclomatic 42) finding(s) in Cyclomatic Complexity — start with Primitive.js, ClassificationPrimitive.js. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 ChatPanel.ChatPanel (cyclomatic 114) finding(s) in Cyclomatic Complexity — start with ChatPanel.tsx. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 BillboardCollection.BillboardCollection.update (cyclomatic 109) finding(s) in Cyclomatic Complexity — start with BillboardCollection.js. — One of this dimension's main actionable groups (1 warning-level).
  4. 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

831 method(s) exceeded the cognitive complexity threshold of 15; the worst was PolygonGeometry.computeAttributes at 209.

update (cognitive 54) · ×2packages/engine/Source/Scene/ClassificationPrimitive.js:1042
update (cognitive 33) · ×2packages/engine/Source/Scene/GroundPolylinePrimitive.js:664
main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 27) · ×2packages/sandcastle/gallery/i3s-3d-object-layer/main.js:51
update (cognitive 17) · ×2packages/engine/Source/Renderer/UniformState.js:1489
PolygonGeometry.computeAttributes (cognitive 209)packages/core/Source/PolygonGeometry.js:62

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

What to do

  1. Resolve the 2 update (cognitive 54) finding(s) in Cognitive Complexity — start with ClassificationPrimitive.js, VoxelEllipsoidShape.js. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 update (cognitive 33) finding(s) in Cognitive Complexity — start with GroundPolylinePrimitive.js, PostProcessStageCollection.js. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 27) finding(s) in Cognitive Complexity — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  4. 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 Classes0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Prevented

276 god class(es) detected.

FunctionTooLong: ChatPanel.ChatPanel · ×148packages/sandcastle/src/copilot/ChatPanel.tsx:152
FileTooLong: DataSources/CzmlDataSource.js · ×100packages/engine/Source/DataSources/CzmlDataSource.js
ClassTooLong: Matrix4 · ×12packages/core/Source/Matrix4.js:62
MethodTooLong: GlobeSurfaceShaderSet.getShaderProgram · ×8packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105
TooManyMethods: Matrix4 · ×8packages/core/Source/Matrix4.js:62

What to do

  1. Resolve the 148 FunctionTooLong finding(s) in God Classes — start with CzmlDataSource.js (13), TerrainFillMesh.js (5), ScreenSpaceCameraController.js (5). — One of this dimension's main actionable groups (148 warning-level).
  2. Resolve the 100 FileTooLong finding(s) in God Classes — start with REDACTED (3), CzmlDataSource.js, KmlDataSource.js. — One of this dimension's main actionable groups (100 warning-level).
  3. Resolve the 12 ClassTooLong finding(s) in God Classes — start with Matrix4.js, ChatPanel.tsx, VertexAIClient.ts. — One of this dimension's main actionable groups (12 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.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

6 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 6 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Verified

1 of 82 classes have LCOM4 above 3.

Low cohesion: GlobeSurfaceTile (LCOM4 5)packages/engine/Source/Scene/GlobeSurfaceTile.js:52

What to do

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

14580 test methods: 14572 unit, 0 integration, 0 BDD, 8 e2e. The JavaScript/TypeScript suite contributes 14580 `it`/`test` case(s) across 733 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.6 / 10Adequategated by 10 critical findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

16 skipped (16 with a documented reason), 361 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 14575 tests. Measured on the JavaScript/TypeScript suite only — at least 3 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.

No assertions (empty test): can not load an invalid image · ×10packages/engine/Specs/Core/loadImageFromTypedArraySpec.js:138
No assertions: does not throw when positions are unique but close · ×351packages/core/Specs/WallGeometrySpec.js:69
Skipped (documented): (unnamed test) · ×16Specs/test.mjs:6

What to do

  1. Resolve the 10 No assertions (empty test) finding(s) in Test Quality — start with loadCubeMapSpec.js (6), GeoJsonDataSourceSpec.js (3), loadImageFromTypedArraySpec.js. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 351 No assertions finding(s) in Test Quality — start with Model3DTileContentSpec.js (38), Geometry3DTileContentSpec.js (29), ITwinPlatformSpec.js (23). — One of this dimension's main actionable groups (351 warning-level).
  3. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

Top hotspots: packages/engine/Source/Scene/GlobeSurfaceTileProvider.js (24×103=2472); packages/engine/Source/Scene/GlobeSurfaceShaderSet.js (11×84=924); packages/engine/Source/Scene/Model/Model.js (36×19=684)

Hotspot: packages/engine/Source/Scene/GlobeSurfaceTileProvider.js · ×18packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510

What to do

  1. Resolve the 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with GlobeSurfaceTileProvider.js, GlobeSurfaceShaderSet.js, Model.js. — One of this dimension's main actionable groups (18 warning-level).

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

D16 · Bus Factor8.7 / 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.7 / 10 · rule-coverage 100% · ceiling Documented

129 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/engine/Source/Scene/MetadataClassProperty.js. Counted over 990 of the 1616 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 · ×12
Further sole-owners (lower concentration)

What to do

  1. Resolve the 12 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (12 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 1 serious finding✓ 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

1 deducted task-comment markers across 12559 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.

TodoCommentpackages/sandcastle/src/ConsoleMirror.tsx:46

What to do

  1. Resolve the 1 TodoComment finding(s) in Explicit Debt — start with ConsoleMirror.tsx. — One of this dimension's main actionable groups (1 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 QualityStrong◐ 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 Strong / 10 · rule-coverage 100% · ceiling Documented

The repository's root README and its Documentation/README directories provide clear, complete documentation for CesiumJS: the root reads as an overview of what the project is (a WebGL-based globe/mapping library) with installation, usage, a links section, and a contributors guide; each subdirectory documents itself. The architecture/design docs are absent from the visible set but the outline confirms they exist. All visible documents are well-structured with headings, examples, and install/usage content. The repository's documentation is comprehensive: the README files (including a detailed CesiumJS widgets README and CLA automation guide) cover installation, usage, community, license, and contribution guidance for each directory they document; architecture/design docs are absent. The Documentation/Contributors/* guides give an overview of the codebase, coding conventions, CI, and review best practices, with a strong focus on maintainability and consistency. The repository's READMEs are mostly focused on specific directories (DracoDecoderModuleManagement, MobileGuide, PerformanceTestingGuide, PresentersGuide, ReleaseGuide) rather than the root project, and each document is well-structured with a clear heading and an outline of its own sections. There is no single overview document describing what the repository does or what it contains; instead, each README states what directory it documents (e.g., 'Updating the Draco JavaScript Decoder Module'). The release guide covers release scheduling, patch/prerelease publishing, and semantic versioning, while the mobile guide explains supported platforms and debugging options. No architecture/design documentation is present.

What to do

  1. Improve Documentation Quality — currently 8.6/10. — The repository's root README and its Documentation/README directories provide clear, complete documentation for CesiumJS: the root reads as an overview of what the project is (a WebGL-based globe/mapping library) with installation, usage, a links section, and a contributors guide; each subdirectory documents itself. The architecture/design docs are absent from the visible set but the outline confirms they exist. All visible documents are well-structured with headings, examples, and install/usage content. The repository's documentation is comprehensive: the README files (including a detailed CesiumJS widgets README and CLA automation guide) cover installation, usage, community, license, and contribution guidance for each directory they document; architecture/design docs are absent. The Documentation/Contributors/* guides give an overview of the codebase, coding conventions, CI, and review best practices, with a strong focus on maintainability and consistency. The repository's READMEs are mostly focused on specific directories (DracoDecoderModuleManagement, MobileGuide, PerformanceTestingGuide, PresentersGuide, ReleaseGuide) rather than the root project, and each document is well-structured with a clear heading and an outline of its own sections. There is no single overview document describing what the repository does or what it contains; instead, each README states what directory it documents (e.g., 'Updating the Draco JavaScript Decoder Module'). The release guide covers release scheduling, patch/prerelease publishing, and semantic versioning, while the mobile guide explains supported platforms and debugging options. No architecture/design documentation is present.

Detailed fixes: d19_recommendation.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.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

4 of 7 build units (npm) flagged as possibly oversized/incoherent.

Split packages/engine
Split packages/sandcastle

What to do

  1. Resolve the 1 Split packages/engine finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Split packages/sandcastle finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

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

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

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

302 finding(s): 0 critical, 302 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 302 REDACTED finding(s) in Secrets (history) — start with REDACTED (121), REDACTED (34), REDACTED (30). — One of this dimension's main actionable groups (302 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

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

47 finding(s): 0 critical, 38 high, 8 medium, 1 low. 29 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 6 file(s) — `packages/engine/Source/DataSources/KmlDataSource.js`, `packages/engine/Source/Scene/ScreenSpaceCameraController.js` (line 694), `packages/engine/Source/ThirdParty/google-earth-dbroot-parser.js`, `packages/engine/Specs/DataSources/CzmlDataSourceSpec.js`, `packages/engine/Specs/Scene/Model/ModelSpec.js`, … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

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 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 29 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (29 issue-level, 0 of them charged here).

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

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

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over REDACTED.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

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

No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. REDACTED was not scanned (REDACTED: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.

REDACTED

✓ On the Gold path — maintain.

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

D34 · Knowledge Freshness6.3 / 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 6.3 / 10 · rule-coverage 100% · ceiling Documented

360 of 990 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/core/Source/GeometryPipeline.js. Counted over 990 of the 1616 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×41packages/core/Source/GeometryPipeline.js
Further orphaned files (smaller)

What to do

  1. Resolve the 41 Orphaned knowledge finding(s) in Knowledge Freshness — start with GeometryPipeline.js, GroundPolylineGeometry.js, RectangleGeometry.js. — One of this dimension's main actionable groups (41 issue-level).
  2. 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.8 / 10Stronggated by 16 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.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: Matrix2.js↔Matrix3.js 93%; ModelGraphics.js↔ModelVisualizer.js 83%; Matrix2.js↔Matrix4.js 73%

Change coupling: Matrix2.js ↔ Matrix3.js · ×16packages/core/Source/Matrix2.js

What to do

  1. Resolve the 16 Change coupling finding(s) in Change Coupling — start with Matrix2.js (2), App.tsx (2), ModelGraphics.js. — One of this dimension's main actionable groups (16 warning-level).

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 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.

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 known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. REDACTED was not scanned (REDACTED: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.

REDACTED

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md · top locations in Appendix A, every location in findings.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 4 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.

AC1 · Text alternatives2.2 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×8) — REDACTED:66, REDACTED:77, packages/engine/Source/Scene/CreditDisplay.js:682, …
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×2) — packages/sandcastle/gallery/bathymetry/REDACTED:23, packages/widgets/Source/Timeline/Timeline.js:151
  • Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way). — packages/sandcastle/gallery/video/REDACTED:17

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels1.9 / 10Critical✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×40) — packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:9, packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:21, packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:33, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.3 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="cesiumContainer">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — Apps/CesiumViewer/REDACTED:2, Apps/HelloWorld.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×5) — Apps/CesiumViewer/REDACTED:9, Apps/HelloWorld.html:9, packages/sandcastle/gallery/ambient-occlusion/REDACTED:3, …
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — REDACTED:2, REDACTED:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — REDACTED:2, REDACTED:2
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×27) — REDACTED:101, REDACTED:140, packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:16, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — packages/sandcastle/gallery/3d-tiles-nga-gpm-visualization/REDACTED:13
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — packages/sandcastle/gallery/aec-elements-api-query/REDACTED:54

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×2) — packages/sandcastle/src/ConsoleMirror.tsx:63, packages/sandcastle/src/ConsoleMirror.tsx:65
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — packages/sandcastle/src/copilot/integrations/ConsoleChatAction.tsx:25
  • The repo's own CSS styles .expandItem with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js:39
  • The repo's own CSS styles .cesium-timeline-bar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — packages/widgets/Source/Timeline/Timeline.js:150

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety7.8 / 10Strong✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • outline:none/0 with no :focus rule in the same stylesheet removes the focus ring. Provide a visible :focus / :focus-visible style. — packages/sandcastle/gallery/atmosphere/REDACTED:1
  • `#viewChanged, #cameraChanged` sets color: white on background-color: red — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — packages/sandcastle/gallery/camera/REDACTED:1
  • This stylesheet animates but never checks prefers-reduced-motion, so motion-sensitive users can't opt out. Wrap motion in @media (prefers-reduced-motion: no-preference). — packages/sandcastle/gallery/mars/REDACTED:1
  • `div.hr` sets color: #dadada on background-color: #dadada — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css:57

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 377 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with @axe-core/playwright in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.9 / 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.

M1 · Documentation (README)7.8 / 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.
  • Add a 'Testing' section to the root README — 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 8 project(s) that lack one — worth up to 0.3 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ 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.

M4 · Documentation accuracy8.0 / 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.

  • README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

What to do

  • Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
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.

P2 · Observability0.0 / 10Critical✓ Tool-verified

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

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

  • No logging call was found in the 1619 JavaScript/TypeScript production file(s) this check read across 5 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt pino (or winston) and log at meaningful points in the services you run.
  • Consider OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) and a health-check endpoint (@godaddy/terminus or a /health route) for operability.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

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

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
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.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 2 of the 2 files that make outbound calls are unbounded; the first 2 are listed. — REDACTED:591
  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — scripts/updateIonToken.js:36

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
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) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `glslToJavaScript` is async and calls existsSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/build-utilities.js:66
  • `tsc` is async and calls execSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:281
  • `prepare` is async and calls copyFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:368
  • `buildDocs` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:412
  • `postversion` is async and calls readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:506
  • `runCoverage` is async and calls writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:621
  • `getLicenseDataFromThirdPartyExtra` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:1281
  • `getLicenseDataFromPackage` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:1337
  • `checkFile` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/moveCoreFiles.js:64

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication8.4 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • 230 duplicated blocks under packages/sandcastle/gallery/ have copies in at least two of the sibling directories 3d-models, 3d-models-articulations-dev, 3d-models-coloring, 3d-models-dev, 3d-models-node-explorer-dev, 3d-tiles-1.1-cdb-yemen (+221 more sibling(s) not listed) — 174 of them are reported below, and 56 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 230 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 230 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 230 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/sandcastle/gallery/aec-snapping/main.js:12
  • 139 duplicated blocks under packages/engine/Source/ have copies in at least two of the sibling directories Core, DataSources, Renderer, Scene, Widget, Workers — 48 of them are reported below, and 91 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 139 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 139 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 139 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/engine/Source/DataSources/DataSourceCollection.js:15
  • 132 duplicated blocks under packages/ have copies in at least two of the sibling directories core, engine, sandcastle, widgets — 47 of them are reported below, and 85 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 132 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 132 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 132 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/core/Source/PolylineGeometry.js:422
  • 23 duplicated blocks under packages/widgets/Source/ have copies in at least two of the sibling directories Animation, BaseLayerPicker, Cesium3DTilesInspector, CesiumInspector, FullscreenButton, Geocoder (+9 more sibling(s) not listed) — 14 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js:29
  • packages/engine/Source/Scene/BillboardCollection.js:191 · packages/engine/Source/Scene/PointPrimitiveCollection.js:125 — the two spans are one implementation copied and then locally edited — 1999 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/BillboardCollection.js:191
  • packages/engine/Source/DataSources/StaticGeometryColorBatch.js:19 · packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:18 — the two spans are one implementation copied and then locally edited — 1831 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGeometryColorBatch.js:19
  • packages/engine/Source/Scene/Vector3DTileClampedPolylines.js:177 · packages/engine/Source/Scene/Vector3DTilePolylines.js:139 — the two spans are one implementation copied and then locally edited — 1843 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Vector3DTileClampedPolylines.js:177
  • packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:28 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:37 — the two spans are one implementation copied and then locally edited — 1651 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:28
  • packages/engine/Source/Scene/VoxelBoxShape.js:75 · packages/engine/Source/Scene/VoxelCylinderShape.js:53 — the two spans are one implementation copied and then locally edited — 1366 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/VoxelBoxShape.js:75
  • packages/core/Source/OrthographicOffCenterFrustum.js:39 · packages/core/Source/PerspectiveOffCenterFrustum.js:47 — the two spans are one implementation copied and then locally edited — 1424 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/core/Source/OrthographicOffCenterFrustum.js:39
  • packages/core/Source/Cartesian3.js:110 · packages/core/Source/Cartesian4.js:117 — the two spans are one implementation copied and then locally edited — 1961 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/core/Source/Cartesian3.js:110
  • packages/engine/Source/DataSources/StaticGeometryColorBatch.js:81 · packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:40 — the two spans are one implementation copied and then locally edited — 1428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGeometryColorBatch.js:81
  • packages/engine/Source/Scene/WebMapServiceImageryProvider.js:114 · packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js:191 — the two spans are one implementation copied and then locally edited — 1133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/WebMapServiceImageryProvider.js:114
  • packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:16 · packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:20 — the two spans are one implementation copied and then locally edited — 1388 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:16
  • packages/engine/Source/Renderer/Texture.js:74 · packages/engine/Source/Renderer/Texture3D.js:91 — the two spans are one implementation copied and then locally edited — 1065 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Renderer/Texture.js:74
  • packages/engine/Source/Scene/Vector3DTileGeometry.js:75 · packages/engine/Source/Scene/Vector3DTilePolygons.js:77 — the two spans are one implementation copied and then locally edited — 1288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Vector3DTileGeometry.js:75
  • packages/engine/Source/Scene/BillboardCollection.js:1729 · packages/engine/Source/Scene/PointPrimitiveCollection.js:902 — the two spans are one implementation copied and then locally edited — 1118 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/BillboardCollection.js:1729
  • packages/engine/REDACTED:134 · packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js:123 — the two spans are one implementation copied and then locally edited — 776 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/REDACTED:134
  • packages/engine/Source/Scene/renderBufferPointCollection.js:62 · packages/engine/Source/Scene/renderBufferPolygonCollection.js:61 — the two spans are one implementation copied and then locally edited — 1058 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/renderBufferPointCollection.js:62
  • packages/engine/Source/DataSources/BillboardVisualizer.js:30 · packages/engine/Source/DataSources/LabelVisualizer.js:31 — the two spans are one implementation copied and then locally edited — 877 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/BillboardVisualizer.js:30
  • packages/engine/Source/DataSources/BoxGeometryUpdater.js:54 · packages/engine/Source/DataSources/CylinderGeometryUpdater.js:63 — the two spans are one implementation copied and then locally edited — 899 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/BoxGeometryUpdater.js:54
  • packages/engine/Source/Scene/ClippingPlaneCollection.js:142 · packages/engine/Source/Scene/VoxelBoundsCollection.js:79 — the two spans are one implementation copied and then locally edited — 949 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/ClippingPlaneCollection.js:142
  • packages/sandcastle/gallery/aec-snapping/main.js:12 · packages/sandcastle/gallery/hybrid-snapping-dev/main.js:45 — the two spans are one implementation copied and then locally edited — 1096 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/sandcastle/gallery/aec-snapping/main.js:12
  • packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:310 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:252 — the two spans are one implementation copied and then locally edited — 1013 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:310
  • packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js:76 · packages/engine/Source/DataSources/WallGeometryUpdater.js:66 — the two spans are one implementation copied and then locally edited — 805 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js:76
  • packages/engine/Source/Scene/Model/B3dmLoader.js:67 · packages/engine/Source/Scene/Model/I3dmLoader.js:79 — the two spans are one implementation copied and then locally edited — 839 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Model/B3dmLoader.js:67
  • packages/engine/Source/Scene/GroundPolylinePrimitive.js:574 · packages/engine/Source/Scene/GroundPrimitive.js:533 — the two spans are one implementation copied and then locally edited — 682 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/GroundPolylinePrimitive.js:574
  • packages/core/Source/OrthographicFrustum.js:65 · packages/core/Source/PerspectiveFrustum.js:91 — the two spans are one implementation copied and then locally edited — 738 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/core/Source/OrthographicFrustum.js:65
  • packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:54 · packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:278 — the two spans are one implementation copied and then locally edited — 735 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:54
  • packages/engine/Source/Scene/Composite3DTileContent.js:34 · packages/engine/Source/Scene/Multiple3DTileContent.js:81 — the two spans are one implementation copied and then locally edited — 679 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Composite3DTileContent.js:34
  • packages/core/Source/EllipseGeometry.js:1030 · packages/core/Source/RectangleGeometry.js:1112 — the two spans are one implementation copied and then locally edited — 757 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/core/Source/EllipseGeometry.js:1030
  • packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:37 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:37 — the two spans are one implementation copied and then locally edited — 832 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:37
  • packages/engine/Source/DataSources/CorridorGeometryUpdater.js:27 · packages/engine/Source/DataSources/EllipseGeometryUpdater.js:27 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/engine/Source/DataSources/CorridorGeometryUpdater.js:27
  • packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js:306 · packages/engine/Source/Core/QuantizedMeshTerrainData.js:435 — the two spans are one implementation copied and then locally edited — 730 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js:306
  • packages/engine/Source/Scene/GltfIndexBufferLoader.js:24 · packages/engine/Source/Scene/GltfVertexBufferLoader.js:24 — the two spans are one implementation copied and then locally edited — 714 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/GltfIndexBufferLoader.js:24
  • packages/engine/Source/Scene/Model/Model.js:844 · packages/engine/Source/Scene/Model/Model.js:1423 — the two spans are one implementation copied and then locally edited — 500 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Model/Model.js:844
  • packages/engine/Source/Scene/Geometry3DTileContent.js:23 · packages/engine/Source/Scene/Vector3DTileContent.js:37 — the two spans are one implementation copied and then locally edited — 604 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/Geometry3DTileContent.js:23
  • packages/engine/Source/Scene/GltfDracoLoader.js:15 · packages/engine/Source/Scene/GltfSpzLoader.js:91 — the two spans are one implementation copied and then locally edited — 658 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/engine/Source/Scene/GltfDracoLoader.js:15
  • packages/core/Source/WallGeometry.js:253 · packages/core/Source/WallOutlineGeometry.js:230 — the two spans are one implementation copied and then locally edited — 629 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/core/Source/WallGeometry.js:253
  • packages/sandcastle/gallery/geometry-offset-attribute-box-cylinder-ellipsoid-dev/main.js:6 · packages/sandcastle/gallery/geometry-offset-attribute-dev/main.js:6 — the two spans are one implementation copied and then locally edited — 659 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/sandcastle/gallery/geometry-offset-attribute-box-cylinder-ellipsoid-dev/main.js:6

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.3 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • REDACTED:24 reaches into another package with a relative path (./packages/core/scripts/build.js) — import the package by name instead. — REDACTED:24
  • REDACTED:25 reaches into another package with a relative path (./packages/engine/scripts/build.js) — import the package by name instead. — REDACTED:25
  • REDACTED:26 reaches into another package with a relative path (./packages/widgets/scripts/build.js) — import the package by name instead. — REDACTED:26
  • packages/core/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead. — packages/core/scripts/build.js:8
  • packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js:2 imports protobufjs/dist/minimal/protobuf.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js:2
  • packages/engine/Source/DataSources/KmlDataSource.js:47 imports @zip.js/zip.js/lib/zip-core.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/engine/Source/DataSources/KmlDataSource.js:47
  • packages/engine/Source/DataSources/exportKml.js:25 imports @zip.js/zip.js/lib/zip-core.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/engine/Source/DataSources/exportKml.js:25
  • packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js:16 imports protobufjs/dist/minimal/protobuf.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js:16
  • packages/engine/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead. — packages/engine/scripts/build.js:8
  • packages/widgets/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead. — packages/widgets/scripts/build.js:8
  • packages/widgets/scripts/build.js:19 reaches into another package with a relative path (../../engine/scripts/build.js) — import the package by name instead. — packages/widgets/scripts/build.js:19
  • scripts/build.js:24 reaches into another package with a relative path (../packages/engine/scripts/build.js) — import the package by name instead. — scripts/build.js:24
  • scripts/build.js:25 reaches into another package with a relative path (../packages/widgets/scripts/build.js) — import the package by name instead. — scripts/build.js:25
  • scripts/buildSandcastle.js:6 reaches into another package with a relative path (../packages/sandcastle/scripts/buildStatic.js) — import the package by name instead. — scripts/buildSandcastle.js:6
  • scripts/buildSandcastle.js:10 reaches into another package with a relative path (../packages/sandcastle/scripts/buildGallery.js) — import the package by name instead. — scripts/buildSandcastle.js:10

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • update has cyclomatic complexity 108 and cognitive complexity 184; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/BillboardCollection.js:1569
  • addDrawCommandsForTile has cyclomatic complexity 107 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510
  • intersectPlaneTestCornersEdgesFaces has cyclomatic complexity 105 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/Specs/OrientedBoundingBoxSpec.js:960
  • RenderState has cyclomatic complexity 96 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Renderer/RenderState.js:93
  • getShaderExpression has cyclomatic complexity 90 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1906
  • getShaderProgram has cyclomatic complexity 84 and cognitive complexity 154; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105
  • computeAttributes has cyclomatic complexity 73 and cognitive complexity 209; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/Source/PolygonGeometry.js:62
  • createGeometry has cyclomatic complexity 69 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/Source/EllipsoidGeometry.js:231
  • fromIso8601 has cyclomatic complexity 69 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/Source/JulianDate.js:312
  • Cesium3DTileset has cyclomatic complexity 68 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/Cesium3DTileset.js:212
  • Viewer has cyclomatic complexity 66 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/widgets/Source/Viewer/Viewer.js:429
  • update has cyclomatic complexity 64 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/PointPrimitiveCollection.js:845
  • createShaders has cyclomatic complexity 64 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:770
  • computeVertices has cyclomatic complexity 62 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Core/HeightmapTessellator.js:117
  • constructExtrudedRectangle has cyclomatic complexity 60 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core/Source/RectangleGeometry.js:457
  • update has cyclomatic complexity 57 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/GaussianSplatPrimitive.js:1686
  • createLayeredEntries has cyclomatic complexity 56 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/createElevationBandMaterial.js:202
  • update has cyclomatic complexity 54 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/VoxelEllipsoidShape.js:236
  • Texture has cyclomatic complexity 53 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Renderer/Texture.js:50
  • handleZoom has cyclomatic complexity 51 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/engine/Source/Scene/ScreenSpaceCameraController.js:561

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files1.5 / 10Critical✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • 516 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: packages/engine/Specs/DataSources/CzmlDataSourceSpec.js (9570), packages/engine/Specs/Scene/Cesium3DTilesetSpec.js (6087), packages/engine/Specs/DataSources/KmlDataSourceSpec.js (5259), packages/engine/Source/Scene/Scene.js (4971), packages/engine/Source/DataSources/CzmlDataSource.js (4888), packages/engine/Specs/Scene/Model/ModelSpec.js (4597) (+510 more).

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.8 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — packages/engine/Source/Scene/Scene.js, packages/engine/Source/DataSources/CzmlDataSource.js, packages/engine/Source/DataSources/KmlDataSource.js, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 1526 file(s) (~606841 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/engine/Source/Renderer/ComputeEngine.js imports '../Shaders/ViewportQuadVS.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — packages/engine
  • Unreachable from the 298 application, 19 tooling and 802 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (298 application, 19 tooling, 802 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — Tools/jsdoc/cesium_template/publish.js, Tools/jsdoc/cesiumTags.js
R8 · Dependency Hygiene1.5 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×3) — packages/core/Source/PolygonPipeline.js:1, packages/core/Source/Math.js:1, packages/core/Source/getAbsoluteUri.js:1
  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • packages/engine/Source/Scene/BatchTableHierarchy.js → REDACTED → packages/engine/Source/Scene/BatchTableHierarchy.js — packages/engine/Source/Scene/BatchTableHierarchy.js
  • packages/engine/Source/Scene/Google2DImageryProvider.js → packages/engine/Source/Scene/IonImageryProviderFactory.js → packages/engine/Source/Scene/Google2DImageryProvider.js — packages/engine/Source/Scene/Google2DImageryProvider.js
  • packages/engine/Source/Scene/I3SDataProvider.js → packages/engine/Source/Scene/I3SLayer.js → packages/engine/Source/Scene/I3SNode.js → packages/engine/Source/Scene/I3SDataProvider.js (one verified cycle inside a mutually-dependent group of 6 files) — packages/engine/Source/Scene/I3SDataProvider.js
  • packages/engine/Source/Scene/PointCloudEyeDomeLighting.js → packages/engine/Source/Scene/PointCloudEyeDomeLighting.js — packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
  • packages/sandcastle/src/Gallery/GalleryItemStore.ts → packages/sandcastle/src/Gallery/applyHighlight.tsx → packages/sandcastle/src/Gallery/GalleryItemStore.ts (one verified cycle inside a mutually-dependent group of 3 files) — packages/sandcastle/src/Gallery/GalleryItemStore.ts
  • packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts → packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts → packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts — packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

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

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

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

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.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health53%Adequate — gated by D2, D3, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture60%Adequate — gated by D26, R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity62%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness28%Weak — gated by R4, R8, P2, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security43%Weak — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility31%Weak — gated by AC1, AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateStrongest area.
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.

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 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.

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .js test runner
  • D12 Dependency Hygiene — Dependency currency not established — this repository commits no lockfile to resolve
  • D14 License Compliance — npm licences not graded — this npm repository commits no lockfile this pass can resolve
  • 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.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. 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
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — This repository's production source (.js, .ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • 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 — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • 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 (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X28 Index access outside its own emptiness guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — 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 — 460 finding(s)
D28 · Secrets (history) · REDACTED · ×302
  • 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
  • + 277 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned knowledge · ×41
  • Orphaned knowledge packages/core/Source/GeometryPipeline.js — 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 packages/engine/Source/Core/GroundPolylineGeometry.js — 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 packages/core/Source/RectangleGeometry.js — 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 packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js — 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 packages/engine/Source/Scene/ClassificationPrimitive.js — 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 packages/core/Source/CorridorGeometry.js — 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 packages/core/Source/EllipseGeometry.js — 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 packages/core/Source/OrientedBoundingBox.js — 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 packages/core/Source/TimeIntervalCollection.js — 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 packages/widgets/Source/Animation/Animation.js — 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 packages/engine/Source/Scene/PointPrimitiveCollection.js — 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 REDACTED — 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 packages/engine/Source/Scene/UrlTemplateImageryProvider.js — 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 packages/engine/Source/Scene/SceneTransitioner.js — 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 packages/engine/Source/Scene/CloudCollection.js — 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 packages/engine/Source/Scene/GroundPrimitive.js — 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 packages/engine/Source/DataSources/GeoJsonDataSource.js — 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 packages/engine/Source/DataSources/GpxDataSource.js — 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 packages/engine/Source/Scene/ShadowVolumeAppearance.js — 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 packages/widgets/Source/Timeline/Timeline.js — 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 packages/engine/Source/DataSources/PolylineGeometryUpdater.js — 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 packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js — 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 packages/core/Source/Occluder.js — 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 packages/engine/Source/Scene/PrimitivePipeline.js — 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 packages/core/Source/BoxGeometry.js — 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.
  • + 16 more in this group — see findings.md.
AC2 · Forms & labels · <input> without a programmatic label · ×34
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:21 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:33 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:27 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:34 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:42 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:49 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:70 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:77 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:83 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:90 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:24 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:31 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:39 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:46 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:21 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:28 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:34 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:41 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:47 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:54 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:68 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:75 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:81 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:88 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:94 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • + 9 more in this group — see findings.md.
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
  • + 4 more in this group — see findings.md.
D10 · Test Quality · No assertions (empty test) · ×10
  • No assertions (empty test): can not load an invalid image packages/engine/Specs/Core/loadImageFromTypedArraySpec.js:138 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): Fails when encountering unknown geometry packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js:1476 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): Fails with undefined geometry packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js:1486 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): Fails with unknown geomeetry in geometryCollection packages/engine/Specs/DataSources/GeoJsonDataSourceSpec.js:1496 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when positiveX does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:119 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when negativeX does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:134 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when positiveY does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:149 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when negativeY does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:164 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when positiveZ does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:179 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): calls error function when negativeZ does not exist packages/engine/Specs/Renderer/loadCubeMapSpec.js:194 — Test method has an empty body — it asserts nothing and exercises no code.
AC1 · Text alternatives · <img> without a text alternative · ×8
  • <img> without a text alternative REDACTED:66 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:77 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/engine/Source/Scene/CreditDisplay.js:682 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/sandcastle/gallery/fog/main.js:141 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/sandcastle/gallery/html-overlays/REDACTED:7 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/sandcastle/src/App.tsx:587 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js:111 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.js:153 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · <select> without a programmatic label · ×6
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:9 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:15 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:22 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-coloring/REDACTED:62 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:12 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label packages/sandcastle/gallery/3d-models-dev/REDACTED:19 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · Viewport restricts zoom · ×5
  • Viewport restricts zoom Apps/CesiumViewer/REDACTED:9 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom Apps/HelloWorld.html:9 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom packages/sandcastle/gallery/ambient-occlusion/REDACTED:3 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom packages/sandcastle/gallery/depth-of-field/REDACTED:3 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom packages/sandcastle/gallery/lensflare/REDACTED:3 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×4
  • Import cycle (2 files) packages/engine/Source/Scene/BatchTableHierarchy.js — packages/engine/Source/Scene/BatchTableHierarchy.js → REDACTED → packages/engine/Source/Scene/BatchTableHierarchy.js
  • Import cycle (2 files) packages/engine/Source/Scene/Google2DImageryProvider.js — packages/engine/Source/Scene/Google2DImageryProvider.js → packages/engine/Source/Scene/IonImageryProviderFactory.js → packages/engine/Source/Scene/Google2DImageryProvider.js
  • Import cycle (2 files) packages/sandcastle/src/Gallery/GalleryItemStore.ts — packages/sandcastle/src/Gallery/GalleryItemStore.ts → packages/sandcastle/src/Gallery/applyHighlight.tsx → packages/sandcastle/src/Gallery/GalleryItemStore.ts (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts — packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts → packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts → packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×2
  • Clickable element isn't keyboard-operable packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js:39 — The repo's own CSS styles .expandItem with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable packages/widgets/Source/Timeline/Timeline.js:150 — The repo's own CSS styles .cesium-timeline-bar with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×1
  • Click handler on a non-interactive <div> packages/sandcastle/src/ConsoleMirror.tsx:63 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×1
  • Click handler on a non-interactive <span> packages/sandcastle/src/ConsoleMirror.tsx:65 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> packages/sandcastle/src/copilot/integrations/ConsoleChatAction.tsx:25 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'earcut' · ×1
  • Unlisted import 'earcut' packages/core/Source/PolygonPipeline.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'mersenne-twister' · ×1
  • Unlisted import 'mersenne-twister' packages/core/Source/Math.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'urijs' · ×1
  • Unlisted import 'urijs' packages/core/Source/getAbsoluteUri.js:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) packages/engine/Source/Scene/I3SDataProvider.js — packages/engine/Source/Scene/I3SDataProvider.js → packages/engine/Source/Scene/I3SLayer.js → packages/engine/Source/Scene/I3SNode.js → packages/engine/Source/Scene/I3SDataProvider.js (one verified cycle inside a mutually-dependent group of 6 files)
R9 · Circular Imports · Import cycle (1 files) · ×1
  • Import cycle (1 files) packages/engine/Source/Scene/PointCloudEyeDomeLighting.js — packages/engine/Source/Scene/PointCloudEyeDomeLighting.js → packages/engine/Source/Scene/PointCloudEyeDomeLighting.js
Serious — 1748 finding(s)
D10 · Test Quality · No assertions · ×351
  • No assertions: does not throw when positions are unique but close packages/core/Specs/WallGeometrySpec.js:69 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: works with no listeners packages/core/Specs/EventSpec.js:191 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects if terrain data is not available and rejectOnTileFail is true packages/engine/Specs/Core/sampleTerrainSpec.js:58 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects if terrain data is not available for the second position and rejectOnTileFail is true packages/engine/Specs/Core/sampleTerrainSpec.js:69 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: requires terrainProvider, level, and positions packages/engine/Specs/Core/sampleTerrainSpec.js:104 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: should throw querying heights from terrain without availability packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js:9 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: throws without terrainProvider packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js:26 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: throws without positions packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js:37 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects on tile error when rejectOnTileFail is set packages/engine/Specs/Core/sampleTerrainMostDetailedSpec.js:46 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: Syncs time when looping packages/engine/Specs/Core/VideoSynchronizerSpec.js:60 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: Syncs time when not looping packages/engine/Specs/Core/VideoSynchronizerSpec.js:113 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fromUrl rejects without url packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js:90 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fromUrl throws if the SRS is not supported packages/engine/Specs/Core/VRTheWorldTerrainProviderSpec.js:161 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: works with a simple worker packages/engine/Specs/Core/TaskProcessorSpec.js:30 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: works with a simple worker defined as relative to TaskProcessor._workerModulePrefix packages/engine/Specs/Core/TaskProcessorSpec.js:47 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects promise if worker throws packages/engine/Specs/Core/TaskProcessorSpec.js:155 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects promise if worker returns a non-clonable result packages/engine/Specs/Core/TaskProcessorSpec.js:170 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: throws runtime error if web assembly is not supported and no backup is provided packages/engine/Specs/Core/TaskProcessorSpec.js:264 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: snap is not implemented packages/engine/Specs/Core/SnapServiceSpec.js:10 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: works without a time packages/engine/Specs/Core/Simon1994PlanetaryPositionsSpec.js:107 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: (unnamed test) packages/engine/Specs/Core/ScreenSpaceEventHandlerSpec.js:147 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: throws without assetId packages/engine/Specs/Core/IonSnapServiceSpec.js:75 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rejects with RuntimeError when the asset is not geolocated packages/engine/Specs/Core/IonSnapServiceSpec.js:127 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: throws without required options packages/engine/Specs/Core/IonSnapServiceSpec.js:281 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rethrows a 400 without a no-snap message packages/engine/Specs/Core/IonSnapServiceSpec.js:475 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 326 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×148
  • FunctionTooLong: ChatPanel.ChatPanel packages/sandcastle/src/copilot/ChatPanel.tsx:152 — FunctionTooLong — ChatPanel runs 848 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 748 over it, 8.48× 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.
  • FunctionTooLong: GlobeSurfaceTileProvider.addDrawCommandsForTile packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510 — FunctionTooLong — addDrawCommandsForTile runs 618 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 518 over it, 6.18× 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.
  • FunctionTooLong: App.App packages/sandcastle/src/App.tsx:123 — FunctionTooLong — App runs 504 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 404 over it, 5.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: VoxelInspectorViewModel.VoxelInspectorViewModel packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js:54 — FunctionTooLong — VoxelInspectorViewModel runs 503 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 403 over it, 5.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.
  • FunctionTooLong: buildVectorGltfFromMVT.buildVectorGltfFromMVT packages/engine/Source/Scene/buildVectorGltfFromMVT.js:80 — FunctionTooLong — buildVectorGltfFromMVT runs 489 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 389 over it, 4.89× 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.
  • FunctionTooLong: GroundPolylineGeometry.generateGeometryAttributes packages/engine/Source/Core/GroundPolylineGeometry.js:1058 — FunctionTooLong — generateGeometryAttributes runs 401 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 301 over it, 4.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TerrainFillMesh.createFillMesh packages/engine/Source/Scene/TerrainFillMesh.js:824 — FunctionTooLong — createFillMesh runs 401 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 301 over it, 4.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CorridorGeometry.combine packages/core/Source/CorridorGeometry.js:59 — FunctionTooLong — combine runs 373 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 273 over it, 3.73× 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.
  • FunctionTooLong: Viewer.Viewer packages/widgets/Source/Viewer/Viewer.js:429 — FunctionTooLong — Viewer runs 352 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 252 over it, 3.52× 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.
  • FunctionTooLong: createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js:89 — FunctionTooLong — processBuffer runs 350 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 250 over it, 3.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.
  • FunctionTooLong: RectangleGeometry.constructExtrudedRectangle packages/core/Source/RectangleGeometry.js:457 — FunctionTooLong — constructExtrudedRectangle runs 347 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 247 over it, 3.47× 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.
  • FunctionTooLong: renderBufferPolylineCollection.renderBufferPolylineCollection packages/engine/Source/Scene/renderBufferPolylineCollection.js:116 — FunctionTooLong — renderBufferPolylineCollection runs 335 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 235 over it, 3.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CzmlDataSource.processMaterialProperty packages/engine/Source/DataSources/CzmlDataSource.js:1200 — FunctionTooLong — processMaterialProperty runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× 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.
  • FunctionTooLong: createVerticesFromQuantizedTerrainMesh.createVerticesFromQuantizedTerrainMesh packages/engine/Source/Workers/createVerticesFromQuantizedTerrainMesh.js:28 — FunctionTooLong — createVerticesFromQuantizedTerrainMesh runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× 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.
  • FunctionTooLong: EdgeVisibilityPipelineStage.createQuadEdgeGeometry packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:623 — FunctionTooLong — createQuadEdgeGeometry runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× 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.
  • FunctionTooLong: decodeI3S.generateGltfBuffer packages/engine/Source/Workers/decodeI3S.js:628 — FunctionTooLong — generateGltfBuffer runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× 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.
  • FunctionTooLong: upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js:38 — FunctionTooLong — upsampleQuantizedTerrainMesh runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× 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.
  • FunctionTooLong: useToolChainExecution.useToolChainExecution packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts:62 — FunctionTooLong — useToolChainExecution runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× 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.
  • FunctionTooLong: ScreenSpaceCameraController.handleZoom packages/engine/Source/Scene/ScreenSpaceCameraController.js:561 — FunctionTooLong — handleZoom runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× 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.
  • FunctionTooLong: PointCloud.createShaders REDACTED:770 — FunctionTooLong — createShaders runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.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.
  • FunctionTooLong: ApiKeyDialog.ApiKeyDialogBody packages/sandcastle/src/copilot/ApiKeyDialog.tsx:45 — FunctionTooLong — ApiKeyDialogBody runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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.
  • FunctionTooLong: CesiumInspectorViewModel.CesiumInspectorViewModel packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js:67 — FunctionTooLong — CesiumInspectorViewModel runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: createDefaultImageryProviderViewModels.createDefaultImageryProviderViewModels packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js:16 — FunctionTooLong — createDefaultImageryProviderViewModels runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× 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.
  • FunctionTooLong: PolygonGeometry.computeAttributes packages/core/Source/PolygonGeometry.js:62 — FunctionTooLong — computeAttributes runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.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.
  • FunctionTooLong: GlobeSurfaceTileProvider.createTileUniformMap packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1909 — FunctionTooLong — createTileUniformMap runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× 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.
  • + 123 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×100
  • FileTooLong: DataSources/CzmlDataSource.js packages/engine/Source/DataSources/CzmlDataSource.js — FileTooLong — 3889 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 3389 over it, 7.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: DataSources/KmlDataSource.js packages/engine/Source/DataSources/KmlDataSource.js — FileTooLong — 2793 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2293 over it, 5.59× 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: Scene/Scene.js packages/engine/Source/Scene/Scene.js — FileTooLong — 2571 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2071 over it, 5.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: Scene/Camera.js packages/engine/Source/Scene/Camera.js — FileTooLong — 2167 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1667 over it, 4.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Source/GeometryPipeline.js packages/core/Source/GeometryPipeline.js — FileTooLong — 2110 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1610 over it, 4.22× 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: Scene/ScreenSpaceCameraController.js packages/engine/Source/Scene/ScreenSpaceCameraController.js — FileTooLong — 2036 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1536 over it, 4.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: Scene/GlobeSurfaceTileProvider.js packages/engine/Source/Scene/GlobeSurfaceTileProvider.js — FileTooLong — 2031 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1531 over it, 4.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: Scene/GltfLoader.js packages/engine/Source/Scene/GltfLoader.js — FileTooLong — 2014 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1514 over it, 4.03× 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: Source/Matrix4.js packages/core/Source/Matrix4.js — FileTooLong — 1702 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 95% of them inside a single declaration: Matrix4 (62-3047). The bar is 1500 significant lines; this is 202 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Scene/TerrainFillMesh.js packages/engine/Source/Scene/TerrainFillMesh.js — FileTooLong — 1701 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1201 over it, 3.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: REDACTED REDACTED — FileTooLong — 1507 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1007 over it, 3.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Model/Model.js packages/engine/Source/Scene/Model/Model.js — FileTooLong — 1502 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1002 over it, 3.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Scene/Primitive.js packages/engine/Source/Scene/Primitive.js — FileTooLong — 1491 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 991 over it, 2.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Scene/Cesium3DTileset.js packages/engine/Source/Scene/Cesium3DTileset.js — FileTooLong — 1456 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 956 over it, 2.91× 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: Scene/ShadowMap.js packages/engine/Source/Scene/ShadowMap.js — FileTooLong — 1294 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 794 over it, 2.59× 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: Scene/Cesium3DTile.js packages/engine/Source/Scene/Cesium3DTile.js — FileTooLong — 1243 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 743 over it, 2.49× 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: Core/Cesium3DTilesTerrainGeometryProcessor.js packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js — FileTooLong — 1234 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 734 over it, 2.47× 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: Scene/BillboardCollection.js packages/engine/Source/Scene/BillboardCollection.js — FileTooLong — 1219 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 719 over it, 2.44× 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: Scene/PolylineCollection.js packages/engine/Source/Scene/PolylineCollection.js — FileTooLong — 1218 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 718 over it, 2.44× 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: Scene/GaussianSplatPrimitive.js packages/engine/Source/Scene/GaussianSplatPrimitive.js — FileTooLong — 1173 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 673 over it, 2.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: Workers/decodeI3S.js packages/engine/Source/Workers/decodeI3S.js — FileTooLong — 1145 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 645 over it, 2.29× 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: Core/GroundPolylineGeometry.js packages/engine/Source/Core/GroundPolylineGeometry.js — FileTooLong — 1108 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 608 over it, 2.22× 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: Scene/Picking.js packages/engine/Source/Scene/Picking.js — FileTooLong — 1059 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 559 over it, 2.12× 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: Source/RectangleGeometry.js packages/core/Source/RectangleGeometry.js — FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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: Source/CorridorGeometry.js packages/core/Source/CorridorGeometry.js — FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 522 over it, 2.04× 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.
  • + 75 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file packages/engine/Source/Scene/Scene.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/DataSources/CzmlDataSource.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/DataSources/KmlDataSource.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/Camera.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/Cesium3DTileset.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/Model/Model.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/GltfLoader.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/GlobeSurfaceTileProvider.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/core/Source/GeometryPipeline.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/core/Source/Matrix4.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/ScreenSpaceCameraController.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/Cesium3DTile.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/core/Source/Color.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/TerrainFillMesh.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/BillboardCollection.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/VoxelPrimitive.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/widgets/Source/Viewer/Viewer.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/ShadowMap.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/PolylineCollection.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/ImageryLayer.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Scene/Picking.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Core/GroundPolylineGeometry.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/engine/Source/Workers/decodeI3S.js — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
AC3 · Page structure · Data table has no header cells · ×27
  • Data table has no header cells REDACTED:101 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells REDACTED:140 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-models-articulations-dev/REDACTED:16 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-models-coloring/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-models-dev/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-models-node-explorer-dev/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-tiles-feature-styling/REDACTED:16 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-tiles-nga-gpm-visualization/REDACTED:9 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-tiles-point-cloud-shading/REDACTED:8 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/3d-tiles-vertical-exaggeration/REDACTED:9 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/ambient-occlusion/REDACTED:24 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/bathymetry/REDACTED:16 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/bloom/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/classification/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/clipping-performance-dev/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/cloud-parameters/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/clustering/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/depth-of-field/REDACTED:24 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/elevation-band-material/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/fog/REDACTED:18 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/globe-translucency/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/gltf-planar-fill-dev/main.js:63 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/imagery-adjustment/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/imagery-color-to-alpha/REDACTED:7 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells packages/sandcastle/gallery/imagery-layers-manipulation/REDACTED:22 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • + 2 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×18
  • Hotspot: packages/engine/Source/Scene/GlobeSurfaceTileProvider.js packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510 — packages/engine/Source/Scene/GlobeSurfaceTileProvider.js changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 103 in GlobeSurfaceTileProvider.addDrawCommandsForTile at line 2510. 4 of those changes were fix/bug commits, and the other 20 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/GlobeSurfaceTileProvider.js`: 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: packages/engine/Source/Scene/GlobeSurfaceShaderSet.js packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105 — packages/engine/Source/Scene/GlobeSurfaceShaderSet.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in GlobeSurfaceShaderSet.getShaderProgram at line 105. 2 of those changes were fix/bug commits, and the other 9 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/GlobeSurfaceShaderSet.js`: 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: packages/engine/Source/Scene/Model/Model.js packages/engine/Source/Scene/Model/Model.js:2001 — packages/engine/Source/Scene/Model/Model.js changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Model.Model.update at line 2001. 4 of those changes were fix/bug commits, and the other 32 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/Model/Model.js`: 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: packages/engine/Source/Core/VectorPipeline.js packages/engine/Source/Core/VectorPipeline.js:1072 — packages/engine/Source/Core/VectorPipeline.js changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in VectorPipeline._clipRingToRect at line 1072. 10 of those changes were fix/bug commits, and the other 27 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Core/VectorPipeline.js`: 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: REDACTED REDACTED:833 — REDACTED changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in gulpfile.test at line 833. 1 of those changes was a fix/bug commit, and the other 19 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- REDACTED`: 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: packages/sandcastle/src/copilot/ChatPanel.tsx packages/sandcastle/src/copilot/ChatPanel.tsx:152 — packages/sandcastle/src/copilot/ChatPanel.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 114 in ChatPanel.ChatPanel at line 152. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/sandcastle/src/copilot/ChatPanel.tsx`: 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: packages/engine/Source/Scene/renderBufferPolylineCollection.js packages/engine/Source/Scene/renderBufferPolylineCollection.js:116 — packages/engine/Source/Scene/renderBufferPolylineCollection.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in renderBufferPolylineCollection.renderBufferPolylineCollection at line 116. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/renderBufferPolylineCollection.js`: 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: packages/engine/Source/Scene/renderBufferPolygonCollection.js packages/engine/Source/Scene/renderBufferPolygonCollection.js:90 — packages/engine/Source/Scene/renderBufferPolygonCollection.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in renderBufferPolygonCollection.renderBufferPolygonCollection at line 90. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/renderBufferPolygonCollection.js`: 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: packages/engine/Source/Scene/renderBufferPointCollection.js packages/engine/Source/Scene/renderBufferPointCollection.js:90 — packages/engine/Source/Scene/renderBufferPointCollection.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in renderBufferPointCollection.renderBufferPointCollection at line 90. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/renderBufferPointCollection.js`: 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: packages/sandcastle/src/App.tsx packages/sandcastle/src/App.tsx:123 — packages/sandcastle/src/App.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in App.App at line 123. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/sandcastle/src/App.tsx`: 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: packages/engine/Source/Scene/Cesium3DTile.js packages/engine/Source/Scene/Cesium3DTile.js:63 — packages/engine/Source/Scene/Cesium3DTile.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Cesium3DTile.Cesium3DTile at line 63. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/Cesium3DTile.js`: 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: packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js:194 — packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline at line 194. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js`: 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: packages/sandcastle/gallery/hybrid-snapping-dev/main.js packages/sandcastle/gallery/hybrid-snapping-dev/main.js:235 — packages/sandcastle/gallery/hybrid-snapping-dev/main.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in main.viewer.screenSpaceEventHandler.setInputAction() at line 235. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/sandcastle/gallery/hybrid-snapping-dev/main.js`: 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: packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts:62 — packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in useToolChainExecution.useToolChainExecution at line 62. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts`: 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: packages/engine/Source/Scene/Model/Model3DTileContent.js packages/engine/Source/Scene/Model/Model3DTileContent.js:245 — packages/engine/Source/Scene/Model/Model3DTileContent.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Model3DTileContent.update at line 245. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/Model/Model3DTileContent.js`: 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: packages/engine/Source/Scene/QuadtreePrimitive.js packages/engine/Source/Scene/QuadtreePrimitive.js:1395 — packages/engine/Source/Scene/QuadtreePrimitive.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in QuadtreePrimitive.updateHeights at line 1395. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/QuadtreePrimitive.js`: 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: packages/sandcastle/src/copilot/ApiKeyDialog.tsx packages/sandcastle/src/copilot/ApiKeyDialog.tsx:45 — packages/sandcastle/src/copilot/ApiKeyDialog.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ApiKeyDialog.ApiKeyDialogBody at line 45. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/sandcastle/src/copilot/ApiKeyDialog.tsx`: 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: packages/engine/Source/Scene/PostProcessStage.js packages/engine/Source/Scene/PostProcessStage.js:779 — packages/engine/Source/Scene/PostProcessStage.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in PostProcessStage.createSelectedTexture at line 779. 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-03..2026-10-01, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-03 15:11:57 -04:00' --until='2026-10-01 15:11:57 -04:00' --full-history --no-merges -- packages/engine/Source/Scene/PostProcessStage.js`: 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.
D35 · Change Coupling · Change coupling · ×16
  • Change coupling: Matrix2.js ↔ Matrix3.js packages/core/Source/Matrix2.js — `packages/core/Source/Matrix2.js` and `packages/core/Source/Matrix3.js` change together 93% of the time (14 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `953c78e0` Promote some methods from ignore to internal, fill out docs (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix3.js`); `24c1cc4c` Avoid useless assignments part 1 (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix3.js`); `dc7bf2d5` Types: createUniform.js and createUniformArray.js migration (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix3.js`) — run `git show` on any of them.
  • Change coupling: ModelGraphics.js ↔ ModelVisualizer.js packages/engine/Source/DataSources/ModelGraphics.js — `packages/engine/Source/DataSources/ModelGraphics.js` and `packages/engine/Source/DataSources/ModelVisualizer.js` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `74b40ed8` Moved entity environmentMapOptions to ModelGraphics and adjusted default; `110e57f9` feat: moved environmentMapOptions to Entity; `c4a89483` fix: fixes issue #12356 performance drop — run `git show` on any of them.
  • Change coupling: Matrix2.js ↔ Matrix4.js packages/core/Source/Matrix2.js — `packages/core/Source/Matrix2.js` and `packages/core/Source/Matrix4.js` change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `953c78e0` Promote some methods from ignore to internal, fill out docs (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix4.js`); `dc7bf2d5` Types: createUniform.js and createUniformArray.js migration (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix4.js`); `09a8ea0c` Types: Remove unused '@memberof' tags on ES6 classes (at that commit the files were still `packages/engine/Source/Core/Matrix2.js` and `packages/engine/Source/Core/Matrix4.js`) — run `git show` on any of them.
  • Change coupling: Cesium3DTilesTerrainGeometryProcessor.js ↔ Cesium3DTilesTerrainProvider.js packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js — `packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js` and `packages/engine/Source/Core/Cesium3DTilesTerrainProvider.js` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `d08ce7a5` Move constructors to tops of files; `2afb7b65` Clean up, clarify docs in Cesium3DTilesTerrain classes; `a8532185` Remove calls to deprecated defaultValue — run `git show` on any of them.
  • Change coupling: AutomaticUniforms.js ↔ UniformState.js packages/engine/Source/Renderer/AutomaticUniforms.js — `packages/engine/Source/Renderer/AutomaticUniforms.js` and `packages/engine/Source/Renderer/UniformState.js` change together 72% of the time (18 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `06f7c70a` Implements special high-precision model clipping shader; `d3c6685a` docs; `d80e32da` fix — run `git show` on any of them.
  • Change coupling: App.tsx ↔ SettingsProvider.tsx packages/sandcastle/src/App.tsx — `packages/sandcastle/src/App.tsx` and `packages/sandcastle/src/SettingsProvider.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `35d591e6` decouple-1; `3d4146a2` autofix-init; `f48c7a7b` autofix was too jarring. removed. — run `git show` on any of them.
  • Change coupling: EdgeFramebuffer.js ↔ Scene.js packages/engine/Source/Scene/EdgeFramebuffer.js — `packages/engine/Source/Scene/EdgeFramebuffer.js` and `packages/engine/Source/Scene/Scene.js` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `59ed55ee` Edge Depth; `cd5e791b` clear framebuffer solved; `7873a4f4` clear framebuffer temp save — run `git show` on any of them.
  • Change coupling: VoxelBoxShape.js ↔ VoxelCylinderShape.js packages/engine/Source/Scene/VoxelBoxShape.js — `packages/engine/Source/Scene/VoxelBoxShape.js` and `packages/engine/Source/Scene/VoxelCylinderShape.js` change together 70% of the time (16 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `737a0c4e` Clean up voxel shape transforms; `ff471a4e` PR feedback round 1; `784405ff` Clarify shape-specific voxel uniforms — run `git show` on any of them.
  • Change coupling: Bucket.tsx ↔ bucket-client.ts packages/sandcastle/src/Bucket.tsx — `packages/sandcastle/src/Bucket.tsx` and `packages/sandcastle/src/util/bucket-client.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3d4146a2` autofix-init; `8390c545` remove debug logging (at that commit the file was still `packages/sandcastle/templates/bucket-client.js`); `b3a2ba7b` remove todos, solidify bridge message structure (at that commit the file was still `packages/sandcastle/templates/bucket-client.js`) — run `git show` on any of them.
  • Change coupling: ClippingPolygonCollection.js ↔ ModelClippingPolygonsPipelineStage.js packages/engine/Source/Scene/ClippingPolygonCollection.js — `packages/engine/Source/Scene/ClippingPolygonCollection.js` and `packages/engine/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `620a0ec9` Adjust clip polygon region combining; `dc84c675` Feedback from PR; `e87589da` Fix jagged edges — run `git show` on any of them.
  • Change coupling: PickFramebuffer.js ↔ Scene.js packages/engine/Source/Scene/PickFramebuffer.js — `packages/engine/Source/Scene/PickFramebuffer.js` and `packages/engine/Source/Scene/Scene.js` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `a0253e69` separate snap pass; `9299aa98` many fixes and cleanup; `ae0fc98f` Snapping prototype — run `git show` on any of them.
  • Change coupling: VectorProvider.js ↔ ModelVectorLookupPipelineStage.js packages/engine/Source/Core/VectorProvider.js — `packages/engine/Source/Core/VectorProvider.js` and `packages/engine/Source/Scene/Model/ModelVectorLookupPipelineStage.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `ae5276d6` fix large screen space line width; `dcf37469` fix; `c8051a3d` fix — run `git show` on any of them.
  • Change coupling: App.tsx ↔ ChatMessage.tsx packages/sandcastle/src/App.tsx — `packages/sandcastle/src/App.tsx` and `packages/sandcastle/src/copilot/ChatMessage.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `05bb5031` removed diffpreview (unused); `2841f1f1` autofix bf (at that commit the file was still `packages/sandcastle/src/ChatMessage.tsx`); `3d4146a2` autofix-init (at that commit the file was still `packages/sandcastle/src/ChatMessage.tsx`) — run `git show` on any of them.
  • Change coupling: GltfVertexBufferLoader.js ↔ ResourceCacheKey.js packages/engine/Source/Scene/GltfVertexBufferLoader.js — `packages/engine/Source/Scene/GltfVertexBufferLoader.js` and `packages/engine/Source/Scene/ResourceCacheKey.js` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `46c00650` Fix SPZ vertex buffer cache source selection; `c024aed5` spz check; `8db037f8` Fix issue with loading non-spz glTFs — run `git show` on any of them.
  • Change coupling: SettingsProvider.tsx ↔ ChatPanel.tsx packages/sandcastle/src/SettingsProvider.tsx — `packages/sandcastle/src/SettingsProvider.tsx` and `packages/sandcastle/src/copilot/ChatPanel.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `35d591e6` decouple-1; `3d4146a2` autofix-init (at that commit the file was still `packages/sandcastle/src/ChatPanel.tsx`); `f48c7a7b` autofix was too jarring. removed. (at that commit the file was still `packages/sandcastle/src/ChatPanel.tsx`) — run `git show` on any of them.
  • Change coupling: PrimitiveLoadPlan.js ↔ VertexAttributeSemantic.js packages/engine/Source/Scene/PrimitiveLoadPlan.js — `packages/engine/Source/Scene/PrimitiveLoadPlan.js` and `packages/engine/Source/Scene/VertexAttributeSemantic.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `2448e21e` gltf spec updates; `133b04b8` Updated the 3DGS code to support the latest spec and deprecated old spec; `1aff10a0` spz compression extension compatibility updates — run `git show` on any of them.
R11 · Import Boundaries · Boundary violation [package · ×15
  • Boundary violation [package:relative-cross-package] REDACTED:24 — REDACTED:24 reaches into another package with a relative path (./packages/core/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] REDACTED:25 — REDACTED:25 reaches into another package with a relative path (./packages/engine/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] REDACTED:26 — REDACTED:26 reaches into another package with a relative path (./packages/widgets/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/core/scripts/build.js:8 — packages/core/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead.
  • Boundary violation [package:third-party-deep-import] packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js:2 — packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js:2 imports protobufjs/dist/minimal/protobuf.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] packages/engine/Source/DataSources/KmlDataSource.js:47 — packages/engine/Source/DataSources/KmlDataSource.js:47 imports @zip.js/zip.js/lib/zip-core.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] packages/engine/Source/DataSources/exportKml.js:25 — packages/engine/Source/DataSources/exportKml.js:25 imports @zip.js/zip.js/lib/zip-core.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js:16 — packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js:16 imports protobufjs/dist/minimal/protobuf.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] packages/engine/scripts/build.js:8 — packages/engine/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/widgets/scripts/build.js:8 — packages/widgets/scripts/build.js:8 reaches into another package with a relative path (../../../scripts/build-utilities.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] packages/widgets/scripts/build.js:19 — packages/widgets/scripts/build.js:19 reaches into another package with a relative path (../../engine/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/build.js:24 — scripts/build.js:24 reaches into another package with a relative path (../packages/engine/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/build.js:25 — scripts/build.js:25 reaches into another package with a relative path (../packages/widgets/scripts/build.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/buildSandcastle.js:6 — scripts/buildSandcastle.js:6 reaches into another package with a relative path (../packages/sandcastle/scripts/buildStatic.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/buildSandcastle.js:10 — scripts/buildSandcastle.js:10 reaches into another package with a relative path (../packages/sandcastle/scripts/buildGallery.js) — import the package by name instead.
D3 · God Classes · ClassTooLong · ×12
  • ClassTooLong: Matrix4 packages/core/Source/Matrix4.js:62 — ClassTooLong — 1622 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 1222 over it, 4.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: ChatPanel packages/sandcastle/src/copilot/ChatPanel.tsx:1 — ClassTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 448 over it, 2.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VertexAIClient packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:44 — ClassTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 285 over it, 1.71× 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: BoundingSphere packages/core/Source/BoundingSphere.js:29 — ClassTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 272 over it, 1.68× 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: ModelReader packages/engine/Source/Scene/Model/ModelReader.js:48 — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 184 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VoxelInspectorViewModel packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js:1 — ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: buildVectorGltfFromMVT packages/engine/Source/Scene/buildVectorGltfFromMVT.js:1 — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 89 over it, 1.22× 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: ImageryPipelineStage packages/engine/Source/Scene/Model/ImageryPipelineStage.js:43 — ClassTooLong — 480 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 80 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Rectangle packages/core/Source/Rectangle.js:18 — 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: AutomaticUniforms packages/engine/Source/Renderer/AutomaticUniforms.js:1 — ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 68 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DiffMatcher packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:18 — ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 37 over it, 1.09× 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: Cartesian3 packages/core/Source/Cartesian3.js:20 — ClassTooLong — 434 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 34 over it, 1.09× 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×9
  • Sync-over-async blocking scripts/build-utilities.js:66 — `glslToJavaScript` is async and calls existsSync, statSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:281 — `tsc` is async and calls execSync, existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:368 — `prepare` is async and calls copyFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:412 — `buildDocs` is async and calls execSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:506 — `postversion` is async and calls readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:621 — `runCoverage` is async and calls writeFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:1281 — `getLicenseDataFromThirdPartyExtra` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:1337 — `getLicenseDataFromPackage` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/moveCoreFiles.js:64 — `checkFile` is async and calls existsSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · MethodTooLong · ×8
  • MethodTooLong: GlobeSurfaceShaderSet.getShaderProgram packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105 — MethodTooLong — getShaderProgram runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JulianDate.fromIso8601 packages/core/Source/JulianDate.js:312 — MethodTooLong — fromIso8601 runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: Matrix4.inverse packages/core/Source/Matrix4.js:2678 — MethodTooLong — inverse runs 171 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× 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: VertexAIClient.geminiStreamRequest packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:457 — MethodTooLong — geminiStreamRequest runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BoundingSphere.fromEncodedCartesianVertices packages/core/Source/BoundingSphere.js:546 — MethodTooLong — fromEncodedCartesianVertices runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BoundingSphere.fromVertices packages/core/Source/BoundingSphere.js:359 — MethodTooLong — fromVertices 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: GeoJsonPrimitive.constructor packages/engine/Source/Scene/GeoJsonPrimitive.js:90 — MethodTooLong — constructor 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: VertexAIClient.processClaudeSSEStream packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:866 — MethodTooLong — processClaudeSSEStream runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · TooManyMethods · ×8
  • TooManyMethods: Matrix4 packages/core/Source/Matrix4.js:62 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Matrix3 packages/core/Source/Matrix3.js:39 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Cartesian3 packages/core/Source/Cartesian3.js:20 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Matrix2 packages/core/Source/Matrix2.js:24 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Cartesian4 packages/core/Source/Cartesian4.js:18 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Cartesian2 packages/core/Source/Cartesian2.js:19 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Color packages/core/Source/Color.js:34 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BoundingSphere packages/core/Source/BoundingSphere.js:29 — TooManyMethods — 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.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC3 · Page structure · Page without a main landmark · ×4
  • Page without a main landmark Apps/CesiumViewer/REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="cesiumContainer">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark Apps/HelloWorld.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="cesiumContainer">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative packages/sandcastle/gallery/bathymetry/REDACTED:23 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative packages/widgets/Source/Timeline/Timeline.js:151 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
D1 · Cyclomatic Complexity · update (cyclomatic 42) · ×2
  • update (cyclomatic 42) packages/engine/Source/Scene/Primitive.js:2083 — update has cyclomatic complexity 42 (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.
  • update (cyclomatic 42) packages/engine/Source/Scene/ClassificationPrimitive.js:1042 — update has cyclomatic complexity 42 (threshold 15). Of this number, 39 points are the body's own statements and 3 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · update (cognitive 54) · ×2
  • update (cognitive 54) packages/engine/Source/Scene/ClassificationPrimitive.js:1042 — update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 15, loops 2 (4 pts), ternaries 1 (2 pts), other 1 (nesting depth added 15). Of this number, 50 points are the body's own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • update (cognitive 54) packages/engine/Source/Scene/VoxelEllipsoidShape.js:236 — update has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 21, other 2, loops 1, ternaries 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 · update (cognitive 33) · ×2
  • update (cognitive 33) packages/engine/Source/Scene/GroundPolylinePrimitive.js:664 — update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 14). Of this number, 28 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • update (cognitive 33) packages/engine/Source/Scene/PostProcessStageCollection.js:574 — update has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (13 pts), loops 5 (7 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.
D2 · Cognitive Complexity · main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 27) · ×2
  • main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 27) packages/sandcastle/gallery/i3s-3d-object-layer/main.js:51 — main.viewer.screenSpaceEventHandler.setInputAction() has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 17). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
  • main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 27) packages/sandcastle/gallery/i3s-feature-picking/main.js:51 — main.viewer.screenSpaceEventHandler.setInputAction() has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 17). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 66). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · update (cognitive 17) · ×2
  • update (cognitive 17) packages/engine/Source/Renderer/UniformState.js:1489 — update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), other 3, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • update (cognitive 17) packages/engine/Source/Scene/CloudCollection.js:944 — update has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 3. 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience REDACTED:591 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 2 of the 2 files that make outbound calls are unbounded; the first 2 are listed.
  • Outbound HTTP without resilience scripts/updateIonToken.js:36 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Duplicated block with local edits (191 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (191 matched lines × 2 locations) packages/engine/REDACTED:134 — packages/engine/REDACTED:134 · packages/engine/Source/Scene/GoogleEarthEnterpriseMapsProvider.js:123 — the two spans are one implementation copied and then locally edited — 776 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (191 matched lines × 2 locations) packages/engine/Source/Scene/renderBufferPointCollection.js:62 — packages/engine/Source/Scene/renderBufferPointCollection.js:62 · packages/engine/Source/Scene/renderBufferPolygonCollection.js:61 — the two spans are one implementation copied and then locally edited — 1058 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
AC1 · Text alternatives · <video> without a captions track · ×1
  • <video> without a captions track packages/sandcastle/gallery/video/REDACTED:17 — Video with no captions <track> offers no captions. Add a <track kind="captions"> pointing at a WebVTT file for this video (or confirm captions are provided another way).
AC3 · Page structure · Heading level jumps from h1 to h4 · ×1
  • Heading level jumps from h1 to h4 packages/sandcastle/gallery/3d-tiles-nga-gpm-visualization/REDACTED:13 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Empty <h4> heading · ×1
  • Empty <h4> heading packages/sandcastle/gallery/aec-elements-api-query/REDACTED:54 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement packages/sandcastle/gallery/atmosphere/REDACTED:1 — outline:none/0 with no :focus rule in the same stylesheet removes the focus ring. Provide a visible :focus / :focus-visible style.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.0 · ×1
  • Low contrast colour pair in CSS (4.0:1) packages/sandcastle/gallery/camera/REDACTED:1 — `#viewChanged, #cameraChanged` sets color: white on background-color: red — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard packages/sandcastle/gallery/mars/REDACTED:1 — This stylesheet animates but never checks prefers-reduced-motion, so motion-sensitive users can't opt out. Wrap motion in @media (prefers-reduced-motion: no-preference).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.0 · ×1
  • Low contrast colour pair in CSS (1.0:1) Tools/jsdoc/cesium_template/static/styles/jsdoc-default.css:57 — `div.hr` sets color: #dadada on background-color: #dadada — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 377 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · ChatPanel.ChatPanel (cyclomatic 114) · ×1
  • ChatPanel.ChatPanel (cyclomatic 114) packages/sandcastle/src/copilot/ChatPanel.tsx:152 — ChatPanel.ChatPanel has cyclomatic complexity 114 (threshold 15). Most of this is not in the body itself: 14 of the 114 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 297, 953, 923, …). 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 · BillboardCollection.BillboardCollection.update (cyclomatic 109) · ×1
  • BillboardCollection.BillboardCollection.update (cyclomatic 109) packages/engine/Source/Scene/BillboardCollection.js:1569 — BillboardCollection.BillboardCollection.update has cyclomatic complexity 109 (threshold 15). Of this number, 108 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 · addDrawCommandsForTile (cyclomatic 107) · ×1
  • addDrawCommandsForTile (cyclomatic 107) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510 — addDrawCommandsForTile has cyclomatic complexity 107 (threshold 15). To reduce it, separate the cases: extract each independent 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 · RenderState (cyclomatic 96) · ×1
  • RenderState (cyclomatic 96) packages/engine/Source/Renderer/RenderState.js:93 — RenderState has cyclomatic complexity 96 (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 · Expression.Node.getShaderExpression (cyclomatic 90) · ×1
  • Expression.Node.getShaderExpression (cyclomatic 90) REDACTED:1906 — Expression.Node.getShaderExpression has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlobeSurfaceShaderSet.getShaderProgram (cyclomatic 84) · ×1
  • GlobeSurfaceShaderSet.getShaderProgram (cyclomatic 84) packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105 — GlobeSurfaceShaderSet.getShaderProgram has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent 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 · buildVectorGltfFromMVT.buildVectorGltfFromMVT (cyclomatic 84) · ×1
  • buildVectorGltfFromMVT.buildVectorGltfFromMVT (cyclomatic 84) packages/engine/Source/Scene/buildVectorGltfFromMVT.js:80 — buildVectorGltfFromMVT.buildVectorGltfFromMVT has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent 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 · update (cyclomatic 75) · ×1
  • update (cyclomatic 75) packages/engine/Source/Scene/GaussianSplatPrimitive.js:1686 — update has cyclomatic complexity 75 (threshold 15). Of this number, 57 points are the body's own statements and 18 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Viewer (cyclomatic 75) · ×1
  • Viewer (cyclomatic 75) packages/widgets/Source/Viewer/Viewer.js:429 — Viewer has cyclomatic complexity 75 (threshold 15). Of this number, 66 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PolygonGeometry.computeAttributes (cyclomatic 73) · ×1
  • PolygonGeometry.computeAttributes (cyclomatic 73) packages/core/Source/PolygonGeometry.js:62 — PolygonGeometry.computeAttributes has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent 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 · JulianDate.fromIso8601 (cyclomatic 69) · ×1
  • JulianDate.fromIso8601 (cyclomatic 69) packages/core/Source/JulianDate.js:312 — JulianDate.fromIso8601 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 · EllipsoidGeometry.EllipsoidGeometry.createGeometry (cyclomatic 69) · ×1
  • EllipsoidGeometry.EllipsoidGeometry.createGeometry (cyclomatic 69) packages/core/Source/EllipsoidGeometry.js:231 — EllipsoidGeometry.EllipsoidGeometry.createGeometry 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 · Cesium3DTileset (cyclomatic 68) · ×1
  • Cesium3DTileset (cyclomatic 68) packages/engine/Source/Scene/Cesium3DTileset.js:212 — Cesium3DTileset has cyclomatic complexity 68 (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 · PointPrimitiveCollection.PointPrimitiveCollection.update (cyclomatic 64) · ×1
  • PointPrimitiveCollection.PointPrimitiveCollection.update (cyclomatic 64) packages/engine/Source/Scene/PointPrimitiveCollection.js:845 — PointPrimitiveCollection.PointPrimitiveCollection.update has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent 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 · PointCloud.createShaders (cyclomatic 64) · ×1
  • PointCloud.createShaders (cyclomatic 64) REDACTED:770 — PointCloud.createShaders has cyclomatic complexity 64 (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 · ChatMessage.ChatMessage (cyclomatic 64) · ×1
  • ChatMessage.ChatMessage (cyclomatic 64) packages/sandcastle/src/copilot/ChatMessage.tsx:19 — ChatMessage.ChatMessage has cyclomatic complexity 64 (threshold 15). Of this number, 51 points are the body's own statements and 13 belong to 6 function literals inside it that branch. 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 · RectangleGeometry.constructExtrudedRectangle (cyclomatic 60) · ×1
  • RectangleGeometry.constructExtrudedRectangle (cyclomatic 60) packages/core/Source/RectangleGeometry.js:457 — RectangleGeometry.constructExtrudedRectangle has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Cesium3DTilesInspectorViewModel.Cesium3DTilesInspectorViewModel (cyclomatic 58) · ×1
  • Cesium3DTilesInspectorViewModel.Cesium3DTilesInspectorViewModel (cyclomatic 58) packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js:167 — Cesium3DTilesInspectorViewModel.Cesium3DTilesInspectorViewModel has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 2 of the 58 points are its own statements and the rest belongs to 34 function literals inside it that branch (lines 398, 838, 862, …). 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 · App.App (cyclomatic 57) · ×1
  • App.App (cyclomatic 57) packages/sandcastle/src/App.tsx:123 — App.App has cyclomatic complexity 57 (threshold 15). Of this number, 18 points are the body's own statements and 39 belong to 20 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createElevationBandMaterial.createLayeredEntries (cyclomatic 56) · ×1
  • createElevationBandMaterial.createLayeredEntries (cyclomatic 56) packages/engine/Source/Scene/createElevationBandMaterial.js:202 — createElevationBandMaterial.createLayeredEntries 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 · update (cyclomatic 54) · ×1
  • update (cyclomatic 54) packages/engine/Source/Scene/VoxelEllipsoidShape.js:236 — update has cyclomatic complexity 54 (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 · useToolChainExecution.useToolChainExecution (cyclomatic 53) · ×1
  • useToolChainExecution.useToolChainExecution (cyclomatic 53) packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts:62 — useToolChainExecution.useToolChainExecution has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 170, 110, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Texture (cyclomatic 53) · ×1
  • Texture (cyclomatic 53) packages/engine/Source/Renderer/Texture.js:50 — Texture has cyclomatic complexity 53 (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 · unwrapInterval (cyclomatic 51) · ×1
  • unwrapInterval (cyclomatic 51) packages/engine/Source/DataSources/CzmlDataSource.js:524 — unwrapInterval has cyclomatic complexity 51 (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 · handleZoom (cyclomatic 51) · ×1
  • handleZoom (cyclomatic 51) packages/engine/Source/Scene/ScreenSpaceCameraController.js:561 — handleZoom has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeightmapTessellator.HeightmapTessellator.computeVertices (cyclomatic 50) · ×1
  • HeightmapTessellator.HeightmapTessellator.computeVertices (cyclomatic 50) packages/engine/Source/Core/HeightmapTessellator.js:117 — HeightmapTessellator.HeightmapTessellator.computeVertices has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Scene.executeCommands (cyclomatic 50) · ×1
  • Scene.executeCommands (cyclomatic 50) packages/engine/Source/Scene/Scene.js:2779 — Scene.executeCommands has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent 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 · Expression.setEvaluateFunction (cyclomatic 48) · ×1
  • Expression.setEvaluateFunction (cyclomatic 48) REDACTED:955 — Expression.setEvaluateFunction 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 · Model (cyclomatic 48) · ×1
  • Model (cyclomatic 48) packages/engine/Source/Scene/Model/Model.js:199 — Model 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 · renderBufferPolylineCollection.renderBufferPolylineCollection (cyclomatic 45) · ×1
  • renderBufferPolylineCollection.renderBufferPolylineCollection (cyclomatic 45) packages/engine/Source/Scene/renderBufferPolylineCollection.js:116 — renderBufferPolylineCollection.renderBufferPolylineCollection 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 · Expression.parseCall (cyclomatic 45) · ×1
  • Expression.parseCall (cyclomatic 45) REDACTED:652 — Expression.parseCall 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 · EdgeVisibilityPipelineStage.createQuadEdgeGeometry (cyclomatic 44) · ×1
  • EdgeVisibilityPipelineStage.createQuadEdgeGeometry (cyclomatic 44) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:623 — EdgeVisibilityPipelineStage.createQuadEdgeGeometry has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · ImageryLayer.ImageryLayer._createTileImagerySkeletons (cyclomatic 44) · ×1
  • ImageryLayer.ImageryLayer._createTileImagerySkeletons (cyclomatic 44) packages/engine/Source/Scene/ImageryLayer.js:688 — ImageryLayer.ImageryLayer._createTileImagerySkeletons 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 · PathVisualizer.PolylineUpdater.updateObject (cyclomatic 44) · ×1
  • PathVisualizer.PolylineUpdater.updateObject (cyclomatic 44) packages/engine/Source/DataSources/PathVisualizer.js:898 — PathVisualizer.PolylineUpdater.updateObject 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 · CesiumWidget (cyclomatic 44) · ×1
  • CesiumWidget (cyclomatic 44) packages/engine/Source/Widget/CesiumWidget.js:209 — CesiumWidget has cyclomatic complexity 44 (threshold 15). Of this number, 42 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CesiumViewer.main (cyclomatic 43) · ×1
  • CesiumViewer.main (cyclomatic 43) Apps/CesiumViewer/CesiumViewer.js:24 — CesiumViewer.main has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry (cyclomatic 42) · ×1
  • EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry (cyclomatic 42) packages/core/Source/EllipsoidOutlineGeometry.js:223 — EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry has cyclomatic complexity 42 (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.
D1 · Cyclomatic Complexity · Scene.updateAndClearFramebuffers (cyclomatic 42) · ×1
  • Scene.updateAndClearFramebuffers (cyclomatic 42) packages/engine/Source/Scene/Scene.js:3963 — Scene.updateAndClearFramebuffers has cyclomatic complexity 42 (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 · EllipseGeometry.computeTopBottomAttributes (cyclomatic 40) · ×1
  • EllipseGeometry.computeTopBottomAttributes (cyclomatic 40) packages/core/Source/EllipseGeometry.js:46 — EllipseGeometry.computeTopBottomAttributes 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 · CylinderGeometry.CylinderGeometry.createGeometry (cyclomatic 40) · ×1
  • CylinderGeometry.CylinderGeometry.createGeometry (cyclomatic 40) packages/core/Source/CylinderGeometry.js:199 — CylinderGeometry.CylinderGeometry.createGeometry 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 · EdgeVisibilityPipelineStage.extractVisibleEdges (cyclomatic 40) · ×1
  • EdgeVisibilityPipelineStage.extractVisibleEdges (cyclomatic 40) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:348 — EdgeVisibilityPipelineStage.extractVisibleEdges 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 · TerrainFillMesh.propagateEdge (cyclomatic 40) · ×1
  • TerrainFillMesh.propagateEdge (cyclomatic 40) packages/engine/Source/Scene/TerrainFillMesh.js:504 — TerrainFillMesh.propagateEdge 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 · upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh (cyclomatic 40) · ×1
  • upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh (cyclomatic 40) packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js:38 — upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh 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 · addAttribute (cyclomatic 40) · ×1
  • addAttribute (cyclomatic 40) packages/engine/Source/Renderer/VertexArray.js:22 — addAttribute has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · update (cyclomatic 40) · ×1
  • update (cyclomatic 40) packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js:388 — update 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 · PolylineGeometry.PolylineGeometry.createGeometry (cyclomatic 39) · ×1
  • PolylineGeometry.PolylineGeometry.createGeometry (cyclomatic 39) packages/core/Source/PolylineGeometry.js:294 — PolylineGeometry.PolylineGeometry.createGeometry has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · CesiumTerrainProvider.parseMetadataSuccess (cyclomatic 39) · ×1
  • CesiumTerrainProvider.parseMetadataSuccess (cyclomatic 39) packages/engine/Source/Core/CesiumTerrainProvider.js:119 — CesiumTerrainProvider.parseMetadataSuccess 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 · renderBufferPolygonCollection.renderBufferPolygonCollection (cyclomatic 39) · ×1
  • renderBufferPolygonCollection.renderBufferPolygonCollection (cyclomatic 39) packages/engine/Source/Scene/renderBufferPolygonCollection.js:90 — renderBufferPolygonCollection.renderBufferPolygonCollection has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TimeIntervalCollection.TimeIntervalCollection.addInterval (cyclomatic 38) · ×1
  • TimeIntervalCollection.TimeIntervalCollection.addInterval (cyclomatic 38) packages/core/Source/TimeIntervalCollection.js:310 — TimeIntervalCollection.TimeIntervalCollection.addInterval 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 · renderBufferPointCollection.renderBufferPointCollection (cyclomatic 38) · ×1
  • renderBufferPointCollection.renderBufferPointCollection (cyclomatic 38) packages/engine/Source/Scene/renderBufferPointCollection.js:90 — renderBufferPointCollection.renderBufferPointCollection has cyclomatic complexity 38 (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 · CzmlDataSource.getPropertyType (cyclomatic 38) · ×1
  • CzmlDataSource.getPropertyType (cyclomatic 38) packages/engine/Source/DataSources/CzmlDataSource.js:431 — CzmlDataSource.getPropertyType has cyclomatic complexity 38 (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 · EllipsoidPrimitive.EllipsoidPrimitive.update (cyclomatic 38) · ×1
  • EllipsoidPrimitive.EllipsoidPrimitive.update (cyclomatic 38) packages/engine/Source/Scene/EllipsoidPrimitive.js:245 — EllipsoidPrimitive.EllipsoidPrimitive.update 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 · AnthropicClient.processSSEStream (cyclomatic 38) · ×1
  • AnthropicClient.processSSEStream (cyclomatic 38) packages/sandcastle/src/copilot/ai/clients/AnthropicClient.ts:181 — AnthropicClient.processSSEStream 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 · VertexAIClient.processClaudeSSEStream (cyclomatic 38) · ×1
  • VertexAIClient.processClaudeSSEStream (cyclomatic 38) packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:866 — VertexAIClient.processClaudeSSEStream 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 · processProperty (cyclomatic 38) · ×1
  • processProperty (cyclomatic 38) packages/engine/Source/DataSources/CzmlDataSource.js:671 — processProperty 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 · processPositionProperty (cyclomatic 38) · ×1
  • processPositionProperty (cyclomatic 38) packages/engine/Source/DataSources/CzmlDataSource.js:913 — processPositionProperty 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 · buildGallery.buildGalleryList (cyclomatic 37) · ×1
  • buildGallery.buildGalleryList (cyclomatic 37) packages/sandcastle/scripts/buildGallery.js:103 — buildGallery.buildGalleryList has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Geometry3DTileContent.getBatchIds (cyclomatic 37) · ×1
  • Geometry3DTileContent.getBatchIds (cyclomatic 37) packages/engine/Source/Scene/Geometry3DTileContent.js:193 — Geometry3DTileContent.getBatchIds has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StaticGeometryColorBatch.Batch.update (cyclomatic 37) · ×1
  • StaticGeometryColorBatch.Batch.update (cyclomatic 37) packages/engine/Source/DataSources/StaticGeometryColorBatch.js:124 — StaticGeometryColorBatch.Batch.update 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 · AnimationViewModel.AnimationViewModel (cyclomatic 37) · ×1
  • AnimationViewModel.AnimationViewModel (cyclomatic 37) packages/widgets/Source/Animation/AnimationViewModel.js:104 — AnimationViewModel.AnimationViewModel has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 4 of the 37 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 238, 198, 168, …). 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 · QuadtreePrimitive.visitTile (cyclomatic 36) · ×1
  • QuadtreePrimitive.visitTile (cyclomatic 36) packages/engine/Source/Scene/QuadtreePrimitive.js:717 — QuadtreePrimitive.visitTile 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 · Timeline.Timeline._makeTics (cyclomatic 36) · ×1
  • Timeline.Timeline._makeTics (cyclomatic 36) packages/widgets/Source/Timeline/Timeline.js:407 — Timeline.Timeline._makeTics 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 · Texture3D (cyclomatic 36) · ×1
  • Texture3D (cyclomatic 36) packages/engine/Source/Renderer/Texture3D.js:56 — Texture3D has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EntityCluster.createDeclutterCallback (cyclomatic 35) · ×1
  • EntityCluster.createDeclutterCallback (cyclomatic 35) packages/engine/Source/DataSources/EntityCluster.js:225 — EntityCluster.createDeclutterCallback has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to one function literal inside it that branches (line 226). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transcodeKTX2.transcodeCompressed (cyclomatic 35) · ×1
  • transcodeKTX2.transcodeCompressed (cyclomatic 35) packages/engine/Source/Workers/transcodeKTX2.js:138 — transcodeKTX2.transcodeCompressed has cyclomatic complexity 35 (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 · ParticleSystem (cyclomatic 35) · ×1
  • ParticleSystem (cyclomatic 35) packages/engine/Source/Scene/ParticleSystem.js:60 — ParticleSystem has cyclomatic complexity 35 (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 · _onEntityPropertyChanged (cyclomatic 35) · ×1
  • _onEntityPropertyChanged (cyclomatic 35) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:478 — _onEntityPropertyChanged has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline (cyclomatic 34) · ×1
  • ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline (cyclomatic 34) packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js:194 — ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline has cyclomatic complexity 34 (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 · PathVisualizer.subSampleSampledProperty (cyclomatic 34) · ×1
  • PathVisualizer.subSampleSampledProperty (cyclomatic 34) packages/engine/Source/DataSources/PathVisualizer.js:224 — PathVisualizer.subSampleSampledProperty 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 · processNetworkLink (cyclomatic 34) · ×1
  • processNetworkLink (cyclomatic 34) packages/engine/Source/DataSources/KmlDataSource.js:2998 — processNetworkLink has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 3077, 3195). 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 · publish.publish (cyclomatic 33) · ×1
  • publish.publish (cyclomatic 33) Tools/jsdoc/cesium_template/publish.js:267 — publish.publish has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 296, 467, 362, …). 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 · Resource.Resource._Implementations.loadWithXhr (cyclomatic 33) · ×1
  • Resource.Resource._Implementations.loadWithXhr (cyclomatic 33) packages/engine/Source/Core/Resource.js:2099 — Resource.Resource._Implementations.loadWithXhr has cyclomatic complexity 33 (threshold 15). Of this number, 24 points are the body's own statements and 9 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 · Framebuffer.Framebuffer (cyclomatic 33) · ×1
  • Framebuffer.Framebuffer (cyclomatic 33) packages/engine/Source/Renderer/Framebuffer.js:86 — Framebuffer.Framebuffer 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 · ModelAnimationCollection.ModelAnimationCollection.update (cyclomatic 33) · ×1
  • ModelAnimationCollection.ModelAnimationCollection.update (cyclomatic 33) packages/engine/Source/Scene/Model/ModelAnimationCollection.js:405 — ModelAnimationCollection.ModelAnimationCollection.update 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 · PolylineCollection.PolylineCollection.update (cyclomatic 33) · ×1
  • PolylineCollection.PolylineCollection.update (cyclomatic 33) packages/engine/Source/Scene/PolylineCollection.js:419 — PolylineCollection.PolylineCollection.update 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 · Camera.updateMembers (cyclomatic 33) · ×1
  • Camera.updateMembers (cyclomatic 33) packages/engine/Source/Scene/Camera.js:659 — Camera.updateMembers 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 · Scene.Scene.updateEnvironment (cyclomatic 33) · ×1
  • Scene.Scene.updateEnvironment (cyclomatic 33) packages/engine/Source/Scene/Scene.js:3719 — Scene.Scene.updateEnvironment 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 · TimeIntervalCollection.TimeIntervalCollection.removeInterval (cyclomatic 32) · ×1
  • TimeIntervalCollection.TimeIntervalCollection.removeInterval (cyclomatic 32) packages/core/Source/TimeIntervalCollection.js:510 — TimeIntervalCollection.TimeIntervalCollection.removeInterval has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Vector3DTilePoints.Vector3DTilePoints.applyStyle (cyclomatic 32) · ×1
  • Vector3DTilePoints.Vector3DTilePoints.applyStyle (cyclomatic 32) packages/engine/Source/Scene/Vector3DTilePoints.js:324 — Vector3DTilePoints.Vector3DTilePoints.applyStyle 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 · VertexAIClient.geminiStreamRequest (cyclomatic 32) · ×1
  • VertexAIClient.geminiStreamRequest (cyclomatic 32) packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:457 — VertexAIClient.geminiStreamRequest 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 · ApiKeyDialog.ApiKeyDialogBody (cyclomatic 32) · ×1
  • ApiKeyDialog.ApiKeyDialogBody (cyclomatic 32) packages/sandcastle/src/copilot/ApiKeyDialog.tsx:45 — ApiKeyDialog.ApiKeyDialogBody has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 140, 90, 115, …). 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 · CesiumInspectorViewModel.CesiumInspectorViewModel (cyclomatic 32) · ×1
  • CesiumInspectorViewModel.CesiumInspectorViewModel (cyclomatic 32) packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js:67 — CesiumInspectorViewModel.CesiumInspectorViewModel has cyclomatic complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 belong to 10 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShadowMap (cyclomatic 32) · ×1
  • ShadowMap (cyclomatic 32) packages/engine/Source/Scene/ShadowMap.js:83 — ShadowMap has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CorridorGeometry.combine (cyclomatic 31) · ×1
  • CorridorGeometry.combine (cyclomatic 31) packages/core/Source/CorridorGeometry.js:59 — CorridorGeometry.combine has cyclomatic complexity 31 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · PixelFormat.PixelFormat.toInternalFormat (cyclomatic 31) · ×1
  • PixelFormat.PixelFormat.toInternalFormat (cyclomatic 31) packages/core/Source/PixelFormat.js:520 — PixelFormat.PixelFormat.toInternalFormat has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RectangleGeometry.constructRectangle (cyclomatic 31) · ×1
  • RectangleGeometry.constructRectangle (cyclomatic 31) packages/core/Source/RectangleGeometry.js:220 — RectangleGeometry.constructRectangle 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 · RenderState.createFuncs (cyclomatic 31) · ×1
  • RenderState.createFuncs (cyclomatic 31) packages/engine/Source/Renderer/RenderState.js:741 — RenderState.createFuncs has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PolylineCollection.PolylineBucket.write (cyclomatic 31) · ×1
  • PolylineCollection.PolylineBucket.write (cyclomatic 31) packages/engine/Source/Scene/PolylineCollection.js:1351 — PolylineCollection.PolylineBucket.write 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 · Scene.executeCommand (cyclomatic 31) · ×1
  • Scene.executeCommand (cyclomatic 31) packages/engine/Source/Scene/Scene.js:2276 — Scene.executeCommand 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 · decodeI3S.generateGltfBuffer (cyclomatic 31) · ×1
  • decodeI3S.generateGltfBuffer (cyclomatic 31) packages/engine/Source/Workers/decodeI3S.js:628 — decodeI3S.generateGltfBuffer 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 · GalleryItemStore.useGalleryItemStore (cyclomatic 31) · ×1
  • GalleryItemStore.useGalleryItemStore (cyclomatic 31) packages/sandcastle/src/Gallery/GalleryItemStore.ts:49 — GalleryItemStore.useGalleryItemStore has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 166, 108, 306, …). 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 · Billboard (cyclomatic 31) · ×1
  • Billboard (cyclomatic 31) packages/engine/Source/Scene/Billboard.js:100 — Billboard 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 · InvertClassification.InvertClassification.update (cyclomatic 30) · ×1
  • InvertClassification.InvertClassification.update (cyclomatic 30) packages/engine/Source/Scene/InvertClassification.js:177 — InvertClassification.InvertClassification.update has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader (cyclomatic 30) · ×1
  • ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader (cyclomatic 30) packages/engine/Source/Scene/ShadowMapShader.js:215 — ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PostProcessStageCollection.PostProcessStageCollection.update (cyclomatic 30) · ×1
  • PostProcessStageCollection.PostProcessStageCollection.update (cyclomatic 30) packages/engine/Source/Scene/PostProcessStageCollection.js:574 — PostProcessStageCollection.PostProcessStageCollection.update has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TimeDynamicPointCloud.TimeDynamicPointCloud.update (cyclomatic 30) · ×1
  • TimeDynamicPointCloud.TimeDynamicPointCloud.update (cyclomatic 30) packages/engine/Source/Scene/TimeDynamicPointCloud.js:614 — TimeDynamicPointCloud.TimeDynamicPointCloud.update has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · processScreenOverlay · ×1
  • processScreenOverlay::onload (cyclomatic 30) packages/engine/Source/DataSources/KmlDataSource.js:2499 — processScreenOverlay::onload has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeometryPipeline.GeometryPipeline.compressVertices (cyclomatic 29) · ×1
  • GeometryPipeline.GeometryPipeline.compressVertices (cyclomatic 29) packages/core/Source/GeometryPipeline.js:1480 — GeometryPipeline.GeometryPipeline.compressVertices 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 · GroundPolylineGeometry.generateGeometryAttributes (cyclomatic 29) · ×1
  • GroundPolylineGeometry.generateGeometryAttributes (cyclomatic 29) packages/engine/Source/Core/GroundPolylineGeometry.js:1058 — GroundPolylineGeometry.generateGeometryAttributes 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 · ImageBasedLighting.ImageBasedLighting.update (cyclomatic 29) · ×1
  • ImageBasedLighting.ImageBasedLighting.update (cyclomatic 29) packages/engine/Source/Scene/ImageBasedLighting.js:330 — ImageBasedLighting.ImageBasedLighting.update has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FramebufferManager.FramebufferManager.destroy (cyclomatic 29) · ×1
  • FramebufferManager.FramebufferManager.destroy (cyclomatic 29) packages/engine/Source/Renderer/FramebufferManager.js:424 — FramebufferManager.FramebufferManager.destroy 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 · TerrainFillMesh.visitRenderedTiles (cyclomatic 29) · ×1
  • TerrainFillMesh.visitRenderedTiles (cyclomatic 29) packages/engine/Source/Scene/TerrainFillMesh.js:230 — TerrainFillMesh.visitRenderedTiles has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer (cyclomatic 29) · ×1
  • createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer (cyclomatic 29) packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js:89 — createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer 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 · BaseLayerPickerViewModel.BaseLayerPickerViewModel (cyclomatic 29) · ×1
  • BaseLayerPickerViewModel.BaseLayerPickerViewModel (cyclomatic 29) packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js:25 — BaseLayerPickerViewModel.BaseLayerPickerViewModel has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 180, 136, 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 · Label (cyclomatic 29) · ×1
  • Label (cyclomatic 29) packages/engine/Source/Scene/Label.js:141 — Label 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 · Tipsify.Tipsify.tipsify (cyclomatic 28) · ×1
  • Tipsify.Tipsify.tipsify (cyclomatic 28) packages/core/Source/Tipsify.js:119 — Tipsify.Tipsify.tipsify 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 · WallGeometry.WallGeometry.createGeometry (cyclomatic 28) · ×1
  • WallGeometry.WallGeometry.createGeometry (cyclomatic 28) packages/core/Source/WallGeometry.js:352 — WallGeometry.WallGeometry.createGeometry 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 · PolylineCollection.PolylineBucket.writeUpdate (cyclomatic 28) · ×1
  • PolylineCollection.PolylineBucket.writeUpdate (cyclomatic 28) packages/engine/Source/Scene/PolylineCollection.js:1807 — PolylineCollection.PolylineBucket.writeUpdate 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 · Vector3DTileContent.getBatchIds (cyclomatic 28) · ×1
  • Vector3DTileContent.getBatchIds (cyclomatic 28) packages/engine/Source/Scene/Vector3DTileContent.js:262 — Vector3DTileContent.getBatchIds has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Cesium3DTile.applyDebugSettings (cyclomatic 28) · ×1
  • Cesium3DTile.applyDebugSettings (cyclomatic 28) packages/engine/Source/Scene/Cesium3DTile.js:2157 — Cesium3DTile.applyDebugSettings has cyclomatic complexity 28 (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 · StaticGeometryPerMaterialBatch.Batch.update (cyclomatic 28) · ×1
  • StaticGeometryPerMaterialBatch.Batch.update (cyclomatic 28) packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:128 — StaticGeometryPerMaterialBatch.Batch.update 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 · StaticOutlineGeometryBatch.Batch.update (cyclomatic 28) · ×1
  • StaticOutlineGeometryBatch.Batch.update (cyclomatic 28) packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:83 — StaticOutlineGeometryBatch.Batch.update 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 · View.View.createPotentiallyVisibleSet (cyclomatic 28) · ×1
  • View.View.createPotentiallyVisibleSet (cyclomatic 28) packages/engine/Source/Scene/View.js:287 — View.View.createPotentiallyVisibleSet 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 · Scene.Scene.destroy (cyclomatic 28) · ×1
  • Scene.Scene.destroy (cyclomatic 28) packages/engine/Source/Scene/Scene.js:5513 — Scene.Scene.destroy has cyclomatic complexity 28 (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 · GlobeSurfaceTileProvider.computeTileVisibility (cyclomatic 28) · ×1
  • GlobeSurfaceTileProvider.computeTileVisibility (cyclomatic 28) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:755 — GlobeSurfaceTileProvider.computeTileVisibility has cyclomatic complexity 28 (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 · createTracks (cyclomatic 28) · ×1
  • createTracks (cyclomatic 28) packages/engine/Source/DataSources/exportKml.js:629 — createTracks 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 · EllipseGeometry.computeWallAttributes (cyclomatic 27) · ×1
  • EllipseGeometry.computeWallAttributes (cyclomatic 27) packages/core/Source/EllipseGeometry.js:450 — EllipseGeometry.computeWallAttributes 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 · GroundPolylineGeometry.GroundPolylineGeometry.createGeometry (cyclomatic 27) · ×1
  • GroundPolylineGeometry.GroundPolylineGeometry.createGeometry (cyclomatic 27) packages/engine/Source/Core/GroundPolylineGeometry.js:461 — GroundPolylineGeometry.GroundPolylineGeometry.createGeometry 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 · Material.createTexture2DUpdateFunction (cyclomatic 27) · ×1
  • Material.createTexture2DUpdateFunction (cyclomatic 27) packages/engine/Source/Scene/Material.js:900 — Material.createTexture2DUpdateFunction has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 902). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PrimitivePipeline.geometryPipeline (cyclomatic 27) · ×1
  • PrimitivePipeline.geometryPipeline (cyclomatic 27) packages/engine/Source/Scene/PrimitivePipeline.js:89 — PrimitivePipeline.geometryPipeline 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 · SampledProperty.SampledProperty.getValue (cyclomatic 27) · ×1
  • SampledProperty.SampledProperty.getValue (cyclomatic 27) packages/engine/Source/DataSources/SampledProperty.js:368 — SampledProperty.SampledProperty.getValue 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 · PointVisualizer.PointVisualizer.update (cyclomatic 27) · ×1
  • PointVisualizer.PointVisualizer.update (cyclomatic 27) packages/engine/Source/DataSources/PointVisualizer.js:77 — PointVisualizer.PointVisualizer.update 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 · I3SGeometry.I3SGeometry._generateGltf (cyclomatic 27) · ×1
  • I3SGeometry.I3SGeometry._generateGltf (cyclomatic 27) packages/engine/Source/Scene/I3SGeometry.js:290 — I3SGeometry.I3SGeometry._generateGltf 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 · Animation.setShuttleRingFromMouseOrTouch (cyclomatic 27) · ×1
  • Animation.setShuttleRingFromMouseOrTouch (cyclomatic 27) packages/widgets/Source/Animation/Animation.js:214 — Animation.setShuttleRingFromMouseOrTouch has cyclomatic complexity 27 (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 · processDescription (cyclomatic 27) · ×1
  • processDescription (cyclomatic 27) packages/engine/Source/DataSources/KmlDataSource.js:2087 — processDescription 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 · ImageryLayer (cyclomatic 27) · ×1
  • ImageryLayer (cyclomatic 27) packages/engine/Source/Scene/ImageryLayer.js:176 — ImageryLayer has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · buildVectorGltfFromMVT · ×1
  • buildVectorGltfFromMVT::buildStructuralMetadata (cyclomatic 27) packages/engine/Source/Scene/buildVectorGltfFromMVT.js:282 — buildVectorGltfFromMVT::buildStructuralMetadata 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 · WebMapServiceImageryProvider (cyclomatic 27) · ×1
  • WebMapServiceImageryProvider (cyclomatic 27) packages/engine/Source/Scene/WebMapServiceImageryProvider.js:110 — WebMapServiceImageryProvider has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo (cyclomatic 26) · ×1
  • OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo (cyclomatic 26) packages/core/Source/OrientedBoundingBox.js:737 — OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CorridorGeometry.extrudedAttributes (cyclomatic 26) · ×1
  • CorridorGeometry.extrudedAttributes (cyclomatic 26) packages/core/Source/CorridorGeometry.js:530 — CorridorGeometry.extrudedAttributes 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 · Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold (cyclomatic 26) · ×1
  • Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold (cyclomatic 26) packages/core/Source/Intersections2D.js:40 — Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold 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 · GroundPrimitive.GroundPrimitive.update (cyclomatic 26) · ×1
  • GroundPrimitive.GroundPrimitive.update (cyclomatic 26) packages/engine/Source/Scene/GroundPrimitive.js:689 — GroundPrimitive.GroundPrimitive.update has cyclomatic complexity 26 (threshold 15). Of this number, 22 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 · Cesium3DTile.Cesium3DTile (cyclomatic 26) · ×1
  • Cesium3DTile.Cesium3DTile (cyclomatic 26) packages/engine/Source/Scene/Cesium3DTile.js:63 — Cesium3DTile.Cesium3DTile has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ModelVisualizer.ModelVisualizer.update (cyclomatic 26) · ×1
  • ModelVisualizer.ModelVisualizer.update (cyclomatic 26) packages/engine/Source/DataSources/ModelVisualizer.js:133 — ModelVisualizer.ModelVisualizer.update 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 · EntityView.updateTransform (cyclomatic 26) · ×1
  • EntityView.updateTransform (cyclomatic 26) packages/engine/Source/DataSources/EntityView.js:35 — EntityView.updateTransform 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 · VoxelRenderResources.VoxelRenderResources (cyclomatic 26) · ×1
  • VoxelRenderResources.VoxelRenderResources (cyclomatic 26) packages/engine/Source/Scene/VoxelRenderResources.js:31 — VoxelRenderResources.VoxelRenderResources has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GlobeSurfaceTileProvider.updateTileBoundingRegion (cyclomatic 26) · ×1
  • GlobeSurfaceTileProvider.updateTileBoundingRegion (cyclomatic 26) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1702 — GlobeSurfaceTileProvider.updateTileBoundingRegion 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 · GeocoderViewModel.GeocoderViewModel (cyclomatic 26) · ×1
  • GeocoderViewModel.GeocoderViewModel (cyclomatic 26) packages/widgets/Source/Geocoder/GeocoderViewModel.js:37 — GeocoderViewModel.GeocoderViewModel has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 105, 93, 74, …). 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 · loadPrimitive (cyclomatic 26) · ×1
  • loadPrimitive (cyclomatic 26) packages/engine/Source/Scene/GltfLoader.js:2311 — loadPrimitive 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 · GeometryPipeline.splitLongitudePolyline (cyclomatic 25) · ×1
  • GeometryPipeline.splitLongitudePolyline (cyclomatic 25) packages/core/Source/GeometryPipeline.js:2933 — GeometryPipeline.splitLongitudePolyline has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · Vector3DTileGeometry.createPrimitive (cyclomatic 25) · ×1
  • Vector3DTileGeometry.createPrimitive (cyclomatic 25) packages/engine/Source/Scene/Vector3DTileGeometry.js:221 — Vector3DTileGeometry.createPrimitive has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MaterialPipelineStage.MaterialPipelineStage.process (cyclomatic 25) · ×1
  • MaterialPipelineStage.MaterialPipelineStage.process (cyclomatic 25) packages/engine/Source/Scene/Model/MaterialPipelineStage.js:60 — MaterialPipelineStage.MaterialPipelineStage.process has cyclomatic complexity 25 (threshold 15). Of this number, 24 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 · LabelCollection.repositionAllGlyphs (cyclomatic 25) · ×1
  • LabelCollection.repositionAllGlyphs (cyclomatic 25) packages/engine/Source/Scene/LabelCollection.js:382 — LabelCollection.repositionAllGlyphs 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 · CzmlDataSource.processMaterialProperty (cyclomatic 25) · ×1
  • CzmlDataSource.processMaterialProperty (cyclomatic 25) packages/engine/Source/DataSources/CzmlDataSource.js:1200 — CzmlDataSource.processMaterialProperty 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. This is NOT this file's highest cyclomatic complexity: CzmlDataSource.unwrapInterval (cyclomatic 31) 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 · QuadtreePrimitive.updateHeights (cyclomatic 25) · ×1
  • QuadtreePrimitive.updateHeights (cyclomatic 25) packages/engine/Source/Scene/QuadtreePrimitive.js:1395 — QuadtreePrimitive.updateHeights 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 · PointCloud.createResources (cyclomatic 25) · ×1
  • PointCloud.createResources (cyclomatic 25) REDACTED:355 — PointCloud.createResources 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 · PointCloud.PointCloud.update (cyclomatic 25) · ×1
  • PointCloud.PointCloud.update (cyclomatic 25) REDACTED:1275 — PointCloud.PointCloud.update 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 · main.buildCategoryPanel (cyclomatic 25) · ×1
  • main.buildCategoryPanel (cyclomatic 25) REDACTED:64 — main.buildCategoryPanel has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 6 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 · DiffMatcher.fuzzyMatch (cyclomatic 25) · ×1
  • DiffMatcher.fuzzyMatch (cyclomatic 25) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:250 — DiffMatcher.fuzzyMatch 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 · equals (cyclomatic 25) · ×1
  • equals (cyclomatic 25) packages/engine/Source/Scene/Label.js:1389 — equals has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · test (cyclomatic 25) · ×1
  • test (cyclomatic 25) REDACTED:833 — test has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · update (cyclomatic 25) · ×1
  • update (cyclomatic 25) packages/engine/Source/Scene/VoxelCylinderShape.js:219 — update 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 · Primitive.modifyForEncodedNormals (cyclomatic 24) · ×1
  • Primitive.modifyForEncodedNormals (cyclomatic 24) packages/engine/Source/Scene/Primitive.js:1009 — Primitive.modifyForEncodedNormals 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 · GeometryUpdater.GeometryUpdater._onEntityPropertyChanged (cyclomatic 24) · ×1
  • GeometryUpdater.GeometryUpdater._onEntityPropertyChanged (cyclomatic 24) packages/engine/Source/DataSources/GeometryUpdater.js:411 — GeometryUpdater.GeometryUpdater._onEntityPropertyChanged 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 · Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands (cyclomatic 24) · ×1
  • Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands (cyclomatic 24) REDACTED:850 — Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands 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 · PolylineCollection.createCommandLists (cyclomatic 24) · ×1
  • PolylineCollection.createCommandLists (cyclomatic 24) packages/engine/Source/Scene/PolylineCollection.js:593 — PolylineCollection.createCommandLists 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 · TerrainFillMesh.addEdgeMesh (cyclomatic 24) · ×1
  • TerrainFillMesh.addEdgeMesh (cyclomatic 24) packages/engine/Source/Scene/TerrainFillMesh.js:1794 — TerrainFillMesh.addEdgeMesh 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 · applyStyle (cyclomatic 24) · ×1
  • applyStyle (cyclomatic 24) packages/engine/Source/DataSources/KmlDataSource.js:1012 — applyStyle 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 · getNetworkLinkUpdateCallback (cyclomatic 24) · ×1
  • getNetworkLinkUpdateCallback (cyclomatic 24) packages/engine/Source/DataSources/KmlDataSource.js:3991 — getNetworkLinkUpdateCallback has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function items inside it that branch ((anonymous), (anonymous)::removeChildren). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MetadataTableProperty (cyclomatic 24) · ×1
  • MetadataTableProperty (cyclomatic 24) packages/engine/Source/Scene/MetadataTableProperty.js:37 — MetadataTableProperty 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 · QuarticRealPolynomial.neumark (cyclomatic 23) · ×1
  • QuarticRealPolynomial.neumark (cyclomatic 23) packages/core/Source/QuarticRealPolynomial.js:169 — QuarticRealPolynomial.neumark 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. This is NOT this file's highest cyclomatic complexity: QuarticRealPolynomial.QuarticRealPolynomial.computeRealRoots (cyclomatic 27) 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 · PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry (cyclomatic 23) · ×1
  • PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry (cyclomatic 23) packages/core/Source/PolygonGeometryLibrary.js:1050 — PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry 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 · CoplanarPolygonGeometry.createGeometryFromPolygon (cyclomatic 23) · ×1
  • CoplanarPolygonGeometry.createGeometryFromPolygon (cyclomatic 23) packages/core/Source/CoplanarPolygonGeometry.js:41 — CoplanarPolygonGeometry.createGeometryFromPolygon 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 · SimplePolylineGeometry.SimplePolylineGeometry.createGeometry (cyclomatic 23) · ×1
  • SimplePolylineGeometry.SimplePolylineGeometry.createGeometry (cyclomatic 23) packages/core/Source/SimplePolylineGeometry.js:253 — SimplePolylineGeometry.SimplePolylineGeometry.createGeometry 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 · GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry (cyclomatic 23) · ×1
  • GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry (cyclomatic 23) packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js:303 — GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Expression.getEvaluateTernaryComponentwise (cyclomatic 23) · ×1
  • Expression.getEvaluateTernaryComponentwise (cyclomatic 23) REDACTED:414 — Expression.getEvaluateTernaryComponentwise has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 415). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Label.reverseRtl (cyclomatic 23) · ×1
  • Label.reverseRtl (cyclomatic 23) packages/engine/Source/Scene/Label.js:1549 — Label.reverseRtl 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. This is NOT this file's highest cyclomatic complexity: Label.Label.equals (cyclomatic 25) 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 · StaticGroundPolylinePerMaterialBatch.Batch.update (cyclomatic 23) · ×1
  • StaticGroundPolylinePerMaterialBatch.Batch.update (cyclomatic 23) packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:125 — StaticGroundPolylinePerMaterialBatch.Batch.update 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 · KmlDataSource.processStyles (cyclomatic 23) · ×1
  • KmlDataSource.processStyles (cyclomatic 23) packages/engine/Source/DataSources/KmlDataSource.js:1216 — KmlDataSource.processStyles 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. This is NOT this file's highest cyclomatic complexity: KmlDataSource.processScreenOverlay (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Camera.Camera._updateCameraChanged (cyclomatic 23) · ×1
  • Camera.Camera._updateCameraChanged (cyclomatic 23) packages/engine/Source/Scene/Camera.js:376 — Camera.Camera._updateCameraChanged 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 · CubeMapPanorama.CubeMapPanorama.update (cyclomatic 23) · ×1
  • CubeMapPanorama.CubeMapPanorama.update (cyclomatic 23) packages/engine/Source/Scene/CubeMapPanorama.js:162 — CubeMapPanorama.CubeMapPanorama.update has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · OIT.OIT.update (cyclomatic 23) · ×1
  • OIT.OIT.update (cyclomatic 23) packages/engine/Source/Scene/OIT.js:238 — OIT.OIT.update 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 · PostProcessStageTextureCache.PostProcessStageTextureCache.update (cyclomatic 23) · ×1
  • PostProcessStageTextureCache.PostProcessStageTextureCache.update (cyclomatic 23) packages/engine/Source/Scene/PostProcessStageTextureCache.js:321 — PostProcessStageTextureCache.PostProcessStageTextureCache.update 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 · ScreenSpaceCameraController.pan3D (cyclomatic 23) · ×1
  • ScreenSpaceCameraController.pan3D (cyclomatic 23) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2104 — ScreenSpaceCameraController.pan3D 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 · I3SNode.I3SNode._create3DTileDefinition (cyclomatic 23) · ×1
  • I3SNode.I3SNode._create3DTileDefinition (cyclomatic 23) packages/engine/Source/Scene/I3SNode.js:441 — I3SNode.I3SNode._create3DTileDefinition 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 · GeminiClient.streamRequest (cyclomatic 23) · ×1
  • GeminiClient.streamRequest (cyclomatic 23) packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:168 — GeminiClient.streamRequest 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 · PromptInput.PromptInput (cyclomatic 23) · ×1
  • PromptInput.PromptInput (cyclomatic 23) packages/sandcastle/src/copilot/PromptInput.tsx:32 — PromptInput.PromptInput has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 122, 50, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · loadAsynchronous (cyclomatic 23) · ×1
  • loadAsynchronous (cyclomatic 23) packages/engine/Source/Scene/Primitive.js:1153 — loadAsynchronous has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wirePolygon (cyclomatic 23) · ×1
  • wirePolygon (cyclomatic 23) packages/core/Source/PolygonGeometryLibrary.js:615 — wirePolygon 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 · WebMapTileServiceImageryProvider (cyclomatic 23) · ×1
  • WebMapTileServiceImageryProvider (cyclomatic 23) packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js:181 — WebMapTileServiceImageryProvider has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · QuarticRealPolynomial.original (cyclomatic 22) · ×1
  • QuarticRealPolynomial.original (cyclomatic 22) packages/core/Source/QuarticRealPolynomial.js:75 — QuarticRealPolynomial.original has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: QuarticRealPolynomial.QuarticRealPolynomial.computeRealRoots (cyclomatic 27) 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 · CubeMap.CubeMap (cyclomatic 22) · ×1
  • CubeMap.CubeMap (cyclomatic 22) packages/engine/Source/Renderer/CubeMap.js:73 — CubeMap.CubeMap 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 · Material.getUniformType (cyclomatic 22) · ×1
  • Material.getUniformType (cyclomatic 22) packages/engine/Source/Scene/Material.js:1257 — Material.getUniformType 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 · I3dmLoader.createInstances (cyclomatic 22) · ×1
  • I3dmLoader.createInstances (cyclomatic 22) packages/engine/Source/Scene/Model/I3dmLoader.js:375 — I3dmLoader.createInstances 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 · PntsParser.PntsParser.parse (cyclomatic 22) · ×1
  • PntsParser.PntsParser.parse (cyclomatic 22) packages/engine/Source/Scene/PntsParser.js:35 — PntsParser.PntsParser.parse 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 · LabelCollection.rebindAllGlyphs (cyclomatic 22) · ×1
  • LabelCollection.rebindAllGlyphs (cyclomatic 22) packages/engine/Source/Scene/LabelCollection.js:139 — LabelCollection.rebindAllGlyphs 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 · Cesium3DTileset.updateTiles (cyclomatic 22) · ×1
  • Cesium3DTileset.updateTiles (cyclomatic 22) packages/engine/Source/Scene/Cesium3DTileset.js:3199 — Cesium3DTileset.updateTiles has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · StaticGroundGeometryColorBatch.Batch.update (cyclomatic 22) · ×1
  • StaticGroundGeometryColorBatch.Batch.update (cyclomatic 22) packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:91 — StaticGroundGeometryColorBatch.Batch.update 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 · CameraFlightPath.CameraFlightPath.createTween (cyclomatic 22) · ×1
  • CameraFlightPath.CameraFlightPath.createTween (cyclomatic 22) packages/engine/Source/Scene/CameraFlightPath.js:408 — CameraFlightPath.CameraFlightPath.createTween has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · PostProcessStageCollection.PostProcessStageCollection.execute (cyclomatic 22) · ×1
  • PostProcessStageCollection.PostProcessStageCollection.execute (cyclomatic 22) packages/engine/Source/Scene/PostProcessStageCollection.js:770 — PostProcessStageCollection.PostProcessStageCollection.execute has cyclomatic complexity 22 (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 · Scene.Scene.updateDerivedCommands (cyclomatic 22) · ×1
  • Scene.Scene.updateDerivedCommands (cyclomatic 22) packages/engine/Source/Scene/Scene.js:1896 — Scene.Scene.updateDerivedCommands has cyclomatic complexity 22 (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 · TerrainFillMesh.getCornerFromEdge (cyclomatic 22) · ×1
  • TerrainFillMesh.getCornerFromEdge (cyclomatic 22) packages/engine/Source/Scene/TerrainFillMesh.js:2033 — TerrainFillMesh.getCornerFromEdge has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlobeSurfaceTileProvider.canRenderWithoutLosingDetail (cyclomatic 22) · ×1
  • GlobeSurfaceTileProvider.canRenderWithoutLosingDetail (cyclomatic 22) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:936 — GlobeSurfaceTileProvider.canRenderWithoutLosingDetail 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 · decodeMVT.decodeGeometry (cyclomatic 22) · ×1
  • decodeMVT.decodeGeometry (cyclomatic 22) packages/engine/Source/Scene/decodeMVT.js:302 — decodeMVT.decodeGeometry 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 · decodeDraco (cyclomatic 22) · ×1
  • decodeDraco (cyclomatic 22) REDACTED:1168 — decodeDraco has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1179, 1263). 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 · updateDerivedCommands (cyclomatic 22) · ×1
  • updateDerivedCommands (cyclomatic 22) packages/engine/Source/Scene/GlobeTranslucencyState.js:780 — updateDerivedCommands 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 · fromGeometry (cyclomatic 22) · ×1
  • fromGeometry (cyclomatic 22) packages/engine/Source/Renderer/VertexArray.js:577 — fromGeometry 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 · PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy (cyclomatic 21) · ×1
  • PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy (cyclomatic 21) packages/core/Source/PolygonGeometryLibrary.js:774 — PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy 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 · TimeInterval.TimeInterval.intersect (cyclomatic 21) · ×1
  • TimeInterval.TimeInterval.intersect (cyclomatic 21) packages/core/Source/TimeInterval.js:275 — TimeInterval.TimeInterval.intersect has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Cesium3DTilesTerrainGeometryProcessor.clipTileFromQuadrant (cyclomatic 21) · ×1
  • Cesium3DTilesTerrainGeometryProcessor.clipTileFromQuadrant (cyclomatic 21) packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js:1659 — Cesium3DTilesTerrainGeometryProcessor.clipTileFromQuadrant 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 · ScreenSpaceEventHandler.fireTouchEvents (cyclomatic 21) · ×1
  • ScreenSpaceEventHandler.fireTouchEvents (cyclomatic 21) packages/engine/Source/Core/ScreenSpaceEventHandler.js:544 — ScreenSpaceEventHandler.fireTouchEvents has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShaderSource.combineShader (cyclomatic 21) · ×1
  • ShaderSource.combineShader (cyclomatic 21) packages/engine/Source/Renderer/ShaderSource.js:153 — ShaderSource.combineShader has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · Expression.Node._evaluateTimes (cyclomatic 21) · ×1
  • Expression.Node._evaluateTimes (cyclomatic 21) REDACTED:1497 — Expression.Node._evaluateTimes has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Cesium3DTileFeature.getPropertyInherited (cyclomatic 21) · ×1
  • Cesium3DTileFeature.getPropertyInherited (cyclomatic 21) packages/engine/Source/Scene/Cesium3DTileFeature.js:244 — Cesium3DTileFeature.getPropertyInherited 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 · FramebufferManager.FramebufferManager.update (cyclomatic 21) · ×1
  • FramebufferManager.FramebufferManager.update (cyclomatic 21) packages/engine/Source/Renderer/FramebufferManager.js:132 — FramebufferManager.FramebufferManager.update 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 · TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess (cyclomatic 21) · ×1
  • TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess (cyclomatic 21) packages/engine/Source/Scene/TileMapServiceImageryProvider.js:216 — TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess 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 · Vector3DTileContent.initialize (cyclomatic 21) · ×1
  • Vector3DTileContent.initialize (cyclomatic 21) packages/engine/Source/Scene/Vector3DTileContent.js:363 — Vector3DTileContent.initialize 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 · PathVisualizer.PathVisualizer.update (cyclomatic 21) · ×1
  • PathVisualizer.PathVisualizer.update (cyclomatic 21) packages/engine/Source/DataSources/PathVisualizer.js:1268 — PathVisualizer.PathVisualizer.update 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 · TranslucentTileClassification.updateResources (cyclomatic 21) · ×1
  • TranslucentTileClassification.updateResources (cyclomatic 21) packages/engine/Source/Scene/TranslucentTileClassification.js:134 — TranslucentTileClassification.updateResources 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 · ScreenSpaceCameraController.rotateCVOnTerrain (cyclomatic 21) · ×1
  • ScreenSpaceCameraController.rotateCVOnTerrain (cyclomatic 21) packages/engine/Source/Scene/ScreenSpaceCameraController.js:1503 — ScreenSpaceCameraController.rotateCVOnTerrain 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 · TerrainFillMesh.createFillMesh (cyclomatic 21) · ×1
  • TerrainFillMesh.createFillMesh (cyclomatic 21) packages/engine/Source/Scene/TerrainFillMesh.js:824 — TerrainFillMesh.createFillMesh has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · createVectorTilePolygons.createVectorTilePolygons (cyclomatic 21) · ×1
  • createVectorTilePolygons.createVectorTilePolygons (cyclomatic 21) packages/engine/Source/Workers/createVectorTilePolygons.js:105 — createVectorTilePolygons.createVectorTilePolygons has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · Viewer.Viewer.resize (cyclomatic 21) · ×1
  • Viewer.Viewer.resize (cyclomatic 21) packages/widgets/Source/Viewer/Viewer.js:1575 — Viewer.Viewer.resize 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 · VoxelInspectorViewModel.VoxelInspectorViewModel (cyclomatic 21) · ×1
  • VoxelInspectorViewModel.VoxelInspectorViewModel (cyclomatic 21) packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js:54 — VoxelInspectorViewModel.VoxelInspectorViewModel has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 95, 642, 657, …). 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 · processBillboardIcon (cyclomatic 21) · ×1
  • processBillboardIcon (cyclomatic 21) packages/engine/Source/DataSources/KmlDataSource.js:919 — processBillboardIcon 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 · update (cyclomatic 21) · ×1
  • update (cyclomatic 21) packages/engine/Source/DataSources/KmlDataSource.js:3845 — update has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch ((anonymous), recurseIgnoreEntities, (anonymous)::(anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · look3D (cyclomatic 21) · ×1
  • look3D (cyclomatic 21) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2751 — look3D 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 · loadWithXhr · ×1
  • loadWithXhr::onload (cyclomatic 21) packages/engine/Source/Core/Resource.js:2159 — loadWithXhr::onload has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PolygonGeometry (cyclomatic 21) · ×1
  • PolygonGeometry (cyclomatic 21) packages/core/Source/PolygonGeometry.js:668 — PolygonGeometry has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GeometryPipeline.splitLongitudeTriangles (cyclomatic 20) · ×1
  • GeometryPipeline.splitLongitudeTriangles (cyclomatic 20) packages/core/Source/GeometryPipeline.js:2411 — GeometryPipeline.splitLongitudeTriangles 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 · PolygonGeometry.PolygonGeometry.createGeometry (cyclomatic 20) · ×1
  • PolygonGeometry.PolygonGeometry.createGeometry (cyclomatic 20) packages/core/Source/PolygonGeometry.js:1276 — PolygonGeometry.PolygonGeometry.createGeometry 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 · Buffer.Buffer.copyFromBuffer (cyclomatic 20) · ×1
  • Buffer.Buffer.copyFromBuffer (cyclomatic 20) packages/engine/Source/Renderer/Buffer.js:298 — Buffer.Buffer.copyFromBuffer 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 · GltfTextureLoader.createTexture (cyclomatic 20) · ×1
  • GltfTextureLoader.createTexture (cyclomatic 20) packages/engine/Source/Scene/GltfTextureLoader.js:248 — GltfTextureLoader.createTexture 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 · GroundPolylinePrimitive.GroundPolylinePrimitive.update (cyclomatic 20) · ×1
  • GroundPolylinePrimitive.GroundPolylinePrimitive.update (cyclomatic 20) packages/engine/Source/Scene/GroundPolylinePrimitive.js:664 — GroundPolylinePrimitive.GroundPolylinePrimitive.update has cyclomatic complexity 20 (threshold 15). Of this number, 16 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 · pickModel.pickModel (cyclomatic 20) · ×1
  • pickModel.pickModel (cyclomatic 20) packages/engine/Source/Scene/Model/pickModel.js:60 — pickModel.pickModel has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Cesium3DTilesetBaseTraversal.updateAndPushChildren (cyclomatic 20) · ×1
  • Cesium3DTilesetBaseTraversal.updateAndPushChildren (cyclomatic 20) packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js:94 — Cesium3DTilesetBaseTraversal.updateAndPushChildren 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 · GeoJsonDataSource.createObject (cyclomatic 20) · ×1
  • GeoJsonDataSource.createObject (cyclomatic 20) packages/engine/Source/DataSources/GeoJsonDataSource.js:115 — GeoJsonDataSource.createObject 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 · KmlDataSource.processGroundOverlay (cyclomatic 20) · ×1
  • KmlDataSource.processGroundOverlay (cyclomatic 20) packages/engine/Source/DataSources/KmlDataSource.js:2619 — KmlDataSource.processGroundOverlay 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. This is NOT this file's highest cyclomatic complexity: KmlDataSource.processScreenOverlay (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · exportKml.recurseEntities (cyclomatic 20) · ×1
  • exportKml.recurseEntities (cyclomatic 20) packages/engine/Source/DataSources/exportKml.js:416 — exportKml.recurseEntities 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 · ScreenSpaceCameraController.tilt3DOnTerrain (cyclomatic 20) · ×1
  • ScreenSpaceCameraController.tilt3DOnTerrain (cyclomatic 20) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2550 — ScreenSpaceCameraController.tilt3DOnTerrain 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 · VoxelPrimitive.VoxelPrimitive.update (cyclomatic 20) · ×1
  • VoxelPrimitive.VoxelPrimitive.update (cyclomatic 20) packages/engine/Source/Scene/VoxelPrimitive.js:1155 — VoxelPrimitive.VoxelPrimitive.update 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 · updateForPass (cyclomatic 20) · ×1
  • updateForPass (cyclomatic 20) packages/engine/Source/Scene/Cesium3DTileset.js:3612 — updateForPass 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 · processLineStringOrLinearRing (cyclomatic 20) · ×1
  • processLineStringOrLinearRing (cyclomatic 20) packages/engine/Source/DataSources/KmlDataSource.js:1573 — processLineStringOrLinearRing 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 · update (cyclomatic 20) · ×1
  • update (cyclomatic 20) packages/engine/Source/Scene/Model/Model.js:2001 — update 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 · equals (cyclomatic 20) · ×1
  • equals (cyclomatic 20) packages/engine/Source/Scene/Billboard.js:1555 — equals 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 · fromRectangle (cyclomatic 20) · ×1
  • fromRectangle (cyclomatic 20) packages/core/Source/OrientedBoundingBox.js:342 — fromRectangle 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 · getHeight (cyclomatic 20) · ×1
  • getHeight (cyclomatic 20) packages/engine/Source/Scene/Globe.js:853 — getHeight 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 · CubicRealPolynomial.CubicRealPolynomial.computeRealRoots (cyclomatic 19) · ×1
  • CubicRealPolynomial.CubicRealPolynomial.computeRealRoots (cyclomatic 19) packages/core/Source/CubicRealPolynomial.js:164 — CubicRealPolynomial.CubicRealPolynomial.computeRealRoots 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 · BoundingSphere.fromEncodedCartesianVertices (cyclomatic 19) · ×1
  • BoundingSphere.fromEncodedCartesianVertices (cyclomatic 19) packages/core/Source/BoundingSphere.js:546 — BoundingSphere.fromEncodedCartesianVertices 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 · GeometryPipeline.combineGeometries (cyclomatic 19) · ×1
  • GeometryPipeline.combineGeometries (cyclomatic 19) packages/core/Source/GeometryPipeline.js:939 — GeometryPipeline.combineGeometries has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · GeometryPipeline.computeTriangleAttributes (cyclomatic 19) · ×1
  • GeometryPipeline.computeTriangleAttributes (cyclomatic 19) packages/core/Source/GeometryPipeline.js:2168 — GeometryPipeline.computeTriangleAttributes 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 · PolylineVolumeGeometry.computeAttributes (cyclomatic 19) · ×1
  • PolylineVolumeGeometry.computeAttributes (cyclomatic 19) packages/core/Source/PolylineVolumeGeometry.js:25 — PolylineVolumeGeometry.computeAttributes has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · TimeIntervalCollection.parseDuration (cyclomatic 19) · ×1
  • TimeIntervalCollection.parseDuration (cyclomatic 19) packages/core/Source/TimeIntervalCollection.js:906 — TimeIntervalCollection.parseDuration 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 · TileAvailability.findMaxLevelFromNode (cyclomatic 19) · ×1
  • TileAvailability.findMaxLevelFromNode (cyclomatic 19) packages/engine/Source/Core/TileAvailability.js:390 — TileAvailability.findMaxLevelFromNode 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 · PrimitiveOutlineGenerator.matchAndStoreCoordinates (cyclomatic 19) · ×1
  • PrimitiveOutlineGenerator.matchAndStoreCoordinates (cyclomatic 19) packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js:305 — PrimitiveOutlineGenerator.matchAndStoreCoordinates 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 · EdgeVisibilityPipelineStage.collectVertexColors (cyclomatic 19) · ×1
  • EdgeVisibilityPipelineStage.collectVertexColors (cyclomatic 19) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:518 — EdgeVisibilityPipelineStage.collectVertexColors has cyclomatic complexity 19 (threshold 15). Of this number, 16 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 · Model3DTileContent.update (cyclomatic 19) · ×1
  • Model3DTileContent.update (cyclomatic 19) packages/engine/Source/Scene/Model/Model3DTileContent.js:245 — Model3DTileContent.update has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TileOrientedBoundingBox.checkHalfAxes (cyclomatic 19) · ×1
  • TileOrientedBoundingBox.checkHalfAxes (cyclomatic 19) packages/engine/Source/Scene/TileOrientedBoundingBox.js:43 — TileOrientedBoundingBox.checkHalfAxes has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · EntityCluster.EntityCluster.update (cyclomatic 19) · ×1
  • EntityCluster.EntityCluster.update (cyclomatic 19) packages/engine/Source/DataSources/EntityCluster.js:881 — EntityCluster.EntityCluster.update 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 · StaticGroundGeometryPerMaterialBatch.Batch.update (cyclomatic 19) · ×1
  • StaticGroundGeometryPerMaterialBatch.Batch.update (cyclomatic 19) packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:137 — StaticGroundGeometryPerMaterialBatch.Batch.update 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 · fetchImage (cyclomatic 19) · ×1
  • fetchImage (cyclomatic 19) packages/engine/Source/Core/Resource.js:903 — fetchImage has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · fromVertices (cyclomatic 19) · ×1
  • fromVertices (cyclomatic 19) packages/core/Source/BoundingSphere.js:359 — fromVertices 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 · constructor (cyclomatic 19) · ×1
  • constructor (cyclomatic 19) packages/engine/Source/Scene/GeoJsonPrimitive.js:90 — constructor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator (cyclomatic 18) · ×1
  • FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator (cyclomatic 18) packages/core/Source/FixedFrameTransforms.js:118 — FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 138). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Spline.Spline.findTimeInterval (cyclomatic 18) · ×1
  • Spline.Spline.findTimeInterval (cyclomatic 18) packages/core/Source/Spline.js:93 — Spline.Spline.findTimeInterval 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 · MetadataClassProperty.parseType (cyclomatic 18) · ×1
  • MetadataClassProperty.parseType (cyclomatic 18) packages/engine/Source/Scene/MetadataClassProperty.js:542 — MetadataClassProperty.parseType 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 · CesiumTerrainProvider.requestTileGeometry (cyclomatic 18) · ×1
  • CesiumTerrainProvider.requestTileGeometry (cyclomatic 18) packages/engine/Source/Core/CesiumTerrainProvider.js:914 — CesiumTerrainProvider.requestTileGeometry has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · VectorPipeline._clipRingToRect (cyclomatic 18) · ×1
  • VectorPipeline._clipRingToRect (cyclomatic 18) packages/engine/Source/Core/VectorPipeline.js:1072 — VectorPipeline._clipRingToRect 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 · GeoJsonLoader.parse (cyclomatic 18) · ×1
  • GeoJsonLoader.parse (cyclomatic 18) packages/engine/Source/Scene/Model/GeoJsonLoader.js:531 — GeoJsonLoader.parse has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process (cyclomatic 18) · ×1
  • EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process (cyclomatic 18) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:62 — EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process 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 · PolylineGeometryUpdater.DynamicGeometryUpdater.update (cyclomatic 18) · ×1
  • PolylineGeometryUpdater.DynamicGeometryUpdater.update (cyclomatic 18) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:677 — PolylineGeometryUpdater.DynamicGeometryUpdater.update 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 · GeoJsonDataSource.createPolygon (cyclomatic 18) · ×1
  • GeoJsonDataSource.createPolygon (cyclomatic 18) packages/engine/Source/DataSources/GeoJsonDataSource.js:431 — GeoJsonDataSource.createPolygon 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 · CloudCollection.CloudCollection.update (cyclomatic 18) · ×1
  • CloudCollection.CloudCollection.update (cyclomatic 18) packages/engine/Source/Scene/CloudCollection.js:944 — CloudCollection.CloudCollection.update 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 · ShadowMap.applyDebugSettings (cyclomatic 18) · ×1
  • ShadowMap.applyDebugSettings (cyclomatic 18) packages/engine/Source/Scene/ShadowMap.js:929 — ShadowMap.applyDebugSettings 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 · processVoxelProperties.processVoxelProperties (cyclomatic 18) · ×1
  • processVoxelProperties.processVoxelProperties (cyclomatic 18) packages/engine/Source/Scene/processVoxelProperties.js:15 — processVoxelProperties.processVoxelProperties has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · Scene.Scene.getCompressedTextureFormatSupported (cyclomatic 18) · ×1
  • Scene.Scene.getCompressedTextureFormatSupported (cyclomatic 18) packages/engine/Source/Scene/Scene.js:1769 — Scene.Scene.getCompressedTextureFormatSupported 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 · ParticleSystem.ParticleSystem.update (cyclomatic 18) · ×1
  • ParticleSystem.ParticleSystem.update (cyclomatic 18) packages/engine/Source/Scene/ParticleSystem.js:706 — ParticleSystem.ParticleSystem.update 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 · decodeI3S.decodeDracoEncodedGeometry (cyclomatic 18) · ×1
  • decodeI3S.decodeDracoEncodedGeometry (cyclomatic 18) packages/engine/Source/Workers/decodeI3S.js:1076 — decodeI3S.decodeDracoEncodedGeometry 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 · decodeI3S.decodeDracoAttribute (cyclomatic 18) · ×1
  • decodeI3S.decodeDracoAttribute (cyclomatic 18) packages/engine/Source/Workers/decodeI3S.js:1204 — decodeI3S.decodeDracoAttribute has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1216, 1234, 1252, …). 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 · Bucket.Bucket (cyclomatic 18) · ×1
  • Bucket.Bucket (cyclomatic 18) packages/sandcastle/src/Bucket.tsx:16 — Bucket.Bucket has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 61, 44, 118, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Scene (cyclomatic 18) · ×1
  • Scene (cyclomatic 18) packages/engine/Source/Scene/Scene.js:136 — Scene 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 · load (cyclomatic 18) · ×1
  • load (cyclomatic 18) packages/engine/Source/DataSources/KmlDataSource.js:3353 — load has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · loadMaterial (cyclomatic 18) · ×1
  • loadMaterial (cyclomatic 18) packages/engine/Source/Scene/GltfLoader.js:1891 — loadMaterial 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 · updateZoomTarget (cyclomatic 18) · ×1
  • updateZoomTarget (cyclomatic 18) packages/engine/Source/Widget/CesiumWidget.js:1443 — updateZoomTarget has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GroundPrimitive (cyclomatic 18) · ×1
  • GroundPrimitive (cyclomatic 18) packages/engine/Source/Scene/GroundPrimitive.js:116 — GroundPrimitive 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 · preload (cyclomatic 18) · ×1
  • preload (cyclomatic 18) packages/engine/Source/DataSources/GeoJsonDataSource.js:910 — preload 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 · QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots (cyclomatic 17) · ×1
  • QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots (cyclomatic 17) packages/core/Source/QuadraticRealPolynomial.js:56 — QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots 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 · BoundingSphere.fromPoints (cyclomatic 17) · ×1
  • BoundingSphere.fromPoints (cyclomatic 17) packages/core/Source/BoundingSphere.js:61 — BoundingSphere.fromPoints 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 · GeometryPipeline.GeometryPipeline.computeNormal (cyclomatic 17) · ×1
  • GeometryPipeline.GeometryPipeline.computeNormal (cyclomatic 17) packages/core/Source/GeometryPipeline.js:1162 — GeometryPipeline.GeometryPipeline.computeNormal 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 · GeometryPipeline.splitTriangle (cyclomatic 17) · ×1
  • GeometryPipeline.splitTriangle (cyclomatic 17) packages/core/Source/GeometryPipeline.js:1899 — GeometryPipeline.splitTriangle 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 · PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions (cyclomatic 17) · ×1
  • PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions (cyclomatic 17) packages/core/Source/PolylineVolumeGeometryLibrary.js:371 — PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions 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 · CorridorOutlineGeometry.combine (cyclomatic 17) · ×1
  • CorridorOutlineGeometry.combine (cyclomatic 17) packages/core/Source/CorridorOutlineGeometry.js:31 — CorridorOutlineGeometry.combine 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 · OrthographicOffCenterFrustum.update (cyclomatic 17) · ×1
  • OrthographicOffCenterFrustum.update (cyclomatic 17) packages/core/Source/OrthographicOffCenterFrustum.js:93 — OrthographicOffCenterFrustum.update 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 · MetadataClassProperty.validateScalar (cyclomatic 17) · ×1
  • MetadataClassProperty.validateScalar (cyclomatic 17) packages/engine/Source/Scene/MetadataClassProperty.js:1071 — MetadataClassProperty.validateScalar 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 · FrustumGeometry.FrustumGeometry.createGeometry (cyclomatic 17) · ×1
  • FrustumGeometry.FrustumGeometry.createGeometry (cyclomatic 17) packages/engine/Source/Core/FrustumGeometry.js:385 — FrustumGeometry.FrustumGeometry.createGeometry 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 · MaterialPipelineStage.processMaterialUniforms (cyclomatic 17) · ×1
  • MaterialPipelineStage.processMaterialUniforms (cyclomatic 17) packages/engine/Source/Scene/Model/MaterialPipelineStage.js:763 — MaterialPipelineStage.processMaterialUniforms 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 · PointCloudStylingPipelineStage.PointCloudStylingPipelineStage.process (cyclomatic 17) · ×1
  • PointCloudStylingPipelineStage.PointCloudStylingPipelineStage.process (cyclomatic 17) packages/engine/Source/Scene/Model/PointCloudStylingPipelineStage.js:59 — PointCloudStylingPipelineStage.PointCloudStylingPipelineStage.process has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, 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 · VectorGltf3DTileContent.applyStyle (cyclomatic 17) · ×1
  • VectorGltf3DTileContent.applyStyle (cyclomatic 17) packages/engine/Source/Scene/VectorGltf3DTileContent.js:243 — VectorGltf3DTileContent.applyStyle 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 · ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures (cyclomatic 17) · ×1
  • ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures (cyclomatic 17) packages/engine/Source/Scene/ImageryLayerCollection.js:635 — ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance (cyclomatic 17) · ×1
  • PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance (cyclomatic 17) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:362 — PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance 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 · GeoJsonDataSource.load (cyclomatic 17) · ×1
  • GeoJsonDataSource.load (cyclomatic 17) packages/engine/Source/DataSources/GeoJsonDataSource.js:986 — GeoJsonDataSource.load has cyclomatic complexity 17 (threshold 15). Of this number, 15 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 · OIT.executeTranslucentCommandsSortedMultipass (cyclomatic 17) · ×1
  • OIT.executeTranslucentCommandsSortedMultipass (cyclomatic 17) packages/engine/Source/Scene/OIT.js:711 — OIT.executeTranslucentCommandsSortedMultipass 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 · Scene.updateDerivedCommands (cyclomatic 17) · ×1
  • Scene.updateDerivedCommands (cyclomatic 17) packages/engine/Source/Scene/Scene.js:1804 — Scene.updateDerivedCommands 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 · Scene.Scene.updateHeight (cyclomatic 17) · ×1
  • Scene.Scene.updateHeight (cyclomatic 17) packages/engine/Source/Scene/Scene.js:4309 — Scene.Scene.updateHeight has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 4319, 4352, 4381, …). 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 · Scene.Scene.render (cyclomatic 17) · ×1
  • Scene.Scene.render (cyclomatic 17) packages/engine/Source/Scene/Scene.js:4629 — Scene.Scene.render 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 · createElevationBandMaterial.preprocess (cyclomatic 17) · ×1
  • createElevationBandMaterial.preprocess (cyclomatic 17) packages/engine/Source/Scene/createElevationBandMaterial.js:97 — createElevationBandMaterial.preprocess 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 · main.viewer.screenSpaceEventHandler.setInputAction() (cyclomatic 17) · ×1
  • main.viewer.screenSpaceEventHandler.setInputAction() (cyclomatic 17) packages/sandcastle/gallery/aec-snapping/main.js:145 — main.viewer.screenSpaceEventHandler.setInputAction() 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 · ToolCallDisplay.ToolCallDisplay (cyclomatic 17) · ×1
  • ToolCallDisplay.ToolCallDisplay (cyclomatic 17) packages/sandcastle/src/copilot/ToolCallDisplay.tsx:19 — ToolCallDisplay.ToolCallDisplay 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 · setView (cyclomatic 17) · ×1
  • setView (cyclomatic 17) packages/engine/Source/Scene/Camera.js:1490 — setView 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 · flyTo (cyclomatic 17) · ×1
  • flyTo (cyclomatic 17) packages/engine/Source/Scene/Camera.js:3427 — flyTo has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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 · createTileUniformMap (cyclomatic 17) · ×1
  • createTileUniformMap (cyclomatic 17) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1909 — createTileUniformMap has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 65 function items inside it that branch (u_clippingPlanes, u_clippingPlanesMatrix, u_vectorSegmentTexture, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · constructor (cyclomatic 17) · ×1
  • constructor (cyclomatic 17) packages/core/Source/Matrix4.js:81 — constructor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: equalsEpsilon (cyclomatic 20) 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 · parse (cyclomatic 17) · ×1
  • parse (cyclomatic 17) packages/engine/Source/Scene/GltfLoader.js:3183 — parse 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 · Primitive (cyclomatic 17) · ×1
  • Primitive (cyclomatic 17) packages/engine/Source/Scene/Primitive.js:156 — Primitive 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 · zoomToOrFly (cyclomatic 17) · ×1
  • zoomToOrFly (cyclomatic 17) packages/engine/Source/Widget/CesiumWidget.js:1314 — zoomToOrFly has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 8 function items inside it that branch ((anonymous), (anonymous)::(anonymous), (anonymous)::(anonymous), …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Context (cyclomatic 17) · ×1
  • Context (cyclomatic 17) packages/engine/Source/Renderer/Context.js:44 — Context 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 · merge (cyclomatic 17) · ×1
  • merge (cyclomatic 17) packages/engine/Source/DataSources/Entity.js:612 — merge 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 · packCreateGeometryResults (cyclomatic 17) · ×1
  • packCreateGeometryResults (cyclomatic 17) packages/engine/Source/Scene/PrimitivePipeline.js:453 — packCreateGeometryResults 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 · Rectangle.intersection (cyclomatic 16) · ×1
  • Rectangle.intersection (cyclomatic 16) packages/core/Source/Rectangle.js:690 — Rectangle.intersection 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 · EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions (cyclomatic 16) · ×1
  • EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions (cyclomatic 16) packages/core/Source/EllipseGeometryLibrary.js:113 — EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions 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 · GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices (cyclomatic 16) · ×1
  • GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices (cyclomatic 16) packages/core/Source/GeometryPipeline.js:495 — GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices 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 · PolygonPipeline.PolygonPipeline.computeSubdivision (cyclomatic 16) · ×1
  • PolygonPipeline.PolygonPipeline.computeSubdivision (cyclomatic 16) packages/core/Source/PolygonPipeline.js:103 — PolygonPipeline.PolygonPipeline.computeSubdivision 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 shape REPEATS in the file: one other method here (PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision) 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.
D1 · Cyclomatic Complexity · PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision (cyclomatic 16) · ×1
  • PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision (cyclomatic 16) packages/core/Source/PolygonPipeline.js:338 — PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision 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 shape REPEATS in the file: one other method here (PolygonPipeline.PolygonPipeline.computeSubdivision) 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.
D1 · Cyclomatic Complexity · RectangleGeometry.calculateAttributesWall (cyclomatic 16) · ×1
  • RectangleGeometry.calculateAttributesWall (cyclomatic 16) packages/core/Source/RectangleGeometry.js:139 — RectangleGeometry.calculateAttributesWall 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 · TimeIntervalCollection.TimeIntervalCollection.intersect (cyclomatic 16) · ×1
  • TimeIntervalCollection.TimeIntervalCollection.intersect (cyclomatic 16) packages/core/Source/TimeIntervalCollection.js:671 — TimeIntervalCollection.TimeIntervalCollection.intersect 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 · Fullscreen.Fullscreen.supportsFullscreen (cyclomatic 16) · ×1
  • Fullscreen.Fullscreen.supportsFullscreen (cyclomatic 16) packages/engine/Source/Core/Fullscreen.js:117 — Fullscreen.Fullscreen.supportsFullscreen 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 · CartographicGeocoderService.CartographicGeocoderService.geocode (cyclomatic 16) · ×1
  • CartographicGeocoderService.CartographicGeocoderService.geocode (cyclomatic 16) packages/engine/Source/Core/CartographicGeocoderService.js:33 — CartographicGeocoderService.CartographicGeocoderService.geocode 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 · Texture.Texture.copyFrom (cyclomatic 16) · ×1
  • Texture.Texture.copyFrom (cyclomatic 16) packages/engine/Source/Renderer/Texture.js:862 — Texture.Texture.copyFrom 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 · QuantizedMeshTerrainData.QuantizedMeshTerrainData.upsample (cyclomatic 16) · ×1
  • QuantizedMeshTerrainData.QuantizedMeshTerrainData.upsample (cyclomatic 16) packages/engine/Source/Core/QuantizedMeshTerrainData.js:404 — QuantizedMeshTerrainData.QuantizedMeshTerrainData.upsample 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, 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 · CesiumTerrainProvider.createQuantizedMeshTerrainData (cyclomatic 16) · ×1
  • CesiumTerrainProvider.createQuantizedMeshTerrainData (cyclomatic 16) packages/engine/Source/Core/CesiumTerrainProvider.js:598 — CesiumTerrainProvider.createQuantizedMeshTerrainData 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 · VertexArray.interleaveAttributes (cyclomatic 16) · ×1
  • VertexArray.interleaveAttributes (cyclomatic 16) packages/engine/Source/Renderer/VertexArray.js:386 — VertexArray.interleaveAttributes has cyclomatic 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.
D1 · Cyclomatic Complexity · RenderState.RenderState.partialApply (cyclomatic 16) · ×1
  • RenderState.RenderState.partialApply (cyclomatic 16) packages/engine/Source/Renderer/RenderState.js:831 — RenderState.RenderState.partialApply 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 · ShaderProgram.createAndLinkProgram (cyclomatic 16) · ×1
  • ShaderProgram.createAndLinkProgram (cyclomatic 16) packages/engine/Source/Renderer/ShaderProgram.js:186 — ShaderProgram.createAndLinkProgram 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 · Primitive.recomputeBoundingSpheres (cyclomatic 16) · ×1
  • Primitive.recomputeBoundingSpheres (cyclomatic 16) packages/engine/Source/Scene/Primitive.js:1376 — Primitive.recomputeBoundingSpheres has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ClassificationPrimitive.updateAndQueueCommands (cyclomatic 16) · ×1
  • ClassificationPrimitive.updateAndQueueCommands (cyclomatic 16) packages/engine/Source/Scene/ClassificationPrimitive.js:915 — ClassificationPrimitive.updateAndQueueCommands 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 · DynamicGeometryUpdater.DynamicGeometryUpdater.getBoundingSphere (cyclomatic 16) · ×1
  • DynamicGeometryUpdater.DynamicGeometryUpdater.getBoundingSphere (cyclomatic 16) packages/engine/Source/DataSources/DynamicGeometryUpdater.js:200 — DynamicGeometryUpdater.DynamicGeometryUpdater.getBoundingSphere has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Expression.Node.getVariables (cyclomatic 16) · ×1
  • Expression.Node.getVariables (cyclomatic 16) REDACTED:2169 — Expression.Node.getVariables 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 · Geometry3DTileContent.initialize (cyclomatic 16) · ×1
  • Geometry3DTileContent.initialize (cyclomatic 16) packages/engine/Source/Scene/Geometry3DTileContent.js:308 — Geometry3DTileContent.initialize 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 · DynamicEnvironmentMapManager.DynamicEnvironmentMapManager.update (cyclomatic 16) · ×1
  • DynamicEnvironmentMapManager.DynamicEnvironmentMapManager.update (cyclomatic 16) packages/engine/Source/Scene/DynamicEnvironmentMapManager.js:856 — DynamicEnvironmentMapManager.DynamicEnvironmentMapManager.update has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates (cyclomatic 16) · ×1
  • SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates (cyclomatic 16) packages/engine/Source/Scene/SceneTransforms.js:101 — SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates 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 · ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process (cyclomatic 16) · ×1
  • ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process (cyclomatic 16) packages/engine/Source/Scene/Model/ImageBasedLightingPipelineStage.js:19 — ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process 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 · TileImagery.TileImagery.processStateMachine (cyclomatic 16) · ×1
  • TileImagery.TileImagery.processStateMachine (cyclomatic 16) packages/engine/Source/Scene/TileImagery.js:46 — TileImagery.TileImagery.processStateMachine 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 · Model.Model.destroy (cyclomatic 16) · ×1
  • Model.Model.destroy (cyclomatic 16) packages/engine/Source/Scene/Model/Model.js:3095 — Model.Model.destroy 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 · SampledProperty.SampledProperty.equals (cyclomatic 16) · ×1
  • SampledProperty.SampledProperty.equals (cyclomatic 16) packages/engine/Source/DataSources/SampledProperty.js:788 — SampledProperty.SampledProperty.equals 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 · GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch (cyclomatic 16) · ×1
  • GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch (cyclomatic 16) packages/engine/Source/DataSources/GeometryVisualizer.js:431 — GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch 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 · KmlDataSource.computeFinalStyle (cyclomatic 16) · ×1
  • KmlDataSource.computeFinalStyle (cyclomatic 16) packages/engine/Source/DataSources/KmlDataSource.js:1118 — KmlDataSource.computeFinalStyle 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: KmlDataSource.processScreenOverlay (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SharedContext.SharedContext.createSceneContext (cyclomatic 16) · ×1
  • SharedContext.SharedContext.createSceneContext (cyclomatic 16) packages/engine/Source/Renderer/SharedContext.js:45 — SharedContext.SharedContext.createSceneContext has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScreenSpaceZoomCameraController.update (cyclomatic 16) · ×1
  • ScreenSpaceZoomCameraController.update (cyclomatic 16) packages/engine/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js:297 — ScreenSpaceZoomCameraController.update 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 · Picking.Picking.pickPositionWorldCoordinates (cyclomatic 16) · ×1
  • Picking.Picking.pickPositionWorldCoordinates (cyclomatic 16) packages/engine/Source/Scene/Picking.js:693 — Picking.Picking.pickPositionWorldCoordinates 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 · PostProcessStage.createSelectedTexture (cyclomatic 16) · ×1
  • PostProcessStage.createSelectedTexture (cyclomatic 16) packages/engine/Source/Scene/PostProcessStage.js:779 — PostProcessStage.createSelectedTexture 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 · GlobeSurfaceTile.processTerrainStateMachine (cyclomatic 16) · ×1
  • GlobeSurfaceTile.processTerrainStateMachine (cyclomatic 16) packages/engine/Source/Scene/GlobeSurfaceTile.js:709 — GlobeSurfaceTile.processTerrainStateMachine 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 · I3SDataProvider.addLayers (cyclomatic 16) · ×1
  • I3SDataProvider.addLayers (cyclomatic 16) packages/engine/Source/Scene/I3SDataProvider.js:426 — I3SDataProvider.addLayers 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 · decodeMVT.decodeValue (cyclomatic 16) · ×1
  • decodeMVT.decodeValue (cyclomatic 16) packages/engine/Source/Scene/decodeMVT.js:404 — decodeMVT.decodeValue 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 · Sun.Sun.update (cyclomatic 16) · ×1
  • Sun.Sun.update (cyclomatic 16) packages/engine/Source/Scene/Sun.js:117 — Sun.Sun.update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decodeGoogleEarthEnterprisePacket.processMetadata (cyclomatic 16) · ×1
  • decodeGoogleEarthEnterprisePacket.processMetadata (cyclomatic 16) packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js:52 — decodeGoogleEarthEnterprisePacket.processMetadata 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 · main.viewer.screenSpaceEventHandler.setInputAction() (cyclomatic 16) · ×1
  • main.viewer.screenSpaceEventHandler.setInputAction() (cyclomatic 16) packages/sandcastle/gallery/hybrid-snapping-dev/main.js:235 — main.viewer.screenSpaceEventHandler.setInputAction() 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 · DiffMatcher.lineTrimmedMatch (cyclomatic 16) · ×1
  • DiffMatcher.lineTrimmedMatch (cyclomatic 16) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:170 — DiffMatcher.lineTrimmedMatch 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 · DiffMatcher.contextBasedMatch (cyclomatic 16) · ×1
  • DiffMatcher.contextBasedMatch (cyclomatic 16) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:365 — DiffMatcher.contextBasedMatch 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 · toolRegistry.createApplyDiffHandler (cyclomatic 16) · ×1
  • toolRegistry.createApplyDiffHandler (cyclomatic 16) packages/sandcastle/src/copilot/ai/tools/toolRegistry.ts:68 — toolRegistry.createApplyDiffHandler has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Viewer.enableVRUI (cyclomatic 16) · ×1
  • Viewer.enableVRUI (cyclomatic 16) packages/widgets/Source/Viewer/Viewer.js:249 — Viewer.enableVRUI 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 · getIconHref (cyclomatic 16) · ×1
  • getIconHref (cyclomatic 16) packages/engine/Source/DataSources/KmlDataSource.js:836 — getIconHref 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 · _onLayerAdded (cyclomatic 16) · ×1
  • _onLayerAdded (cyclomatic 16) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1236 — _onLayerAdded has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (reloadFunction::(anonymous), (anonymous), reloadFunction). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · adjustHeightForTerrain (cyclomatic 16) · ×1
  • adjustHeightForTerrain (cyclomatic 16) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2911 — adjustHeightForTerrain 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 · initializeMaterial (cyclomatic 16) · ×1
  • initializeMaterial (cyclomatic 16) packages/engine/Source/Scene/Material.js:696 — initializeMaterial 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 · fromJulianDateArray (cyclomatic 16) · ×1
  • fromJulianDateArray (cyclomatic 16) packages/core/Source/TimeIntervalCollection.js:744 — fromJulianDateArray 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 · getUniformValueGetterAndSetter (cyclomatic 16) · ×1
  • getUniformValueGetterAndSetter (cyclomatic 16) packages/engine/Source/Scene/PostProcessStage.js:408 — getUniformValueGetterAndSetter has cyclomatic 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 2 function items inside it that branch (set, get). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · localFrameToFixedFrameGenerator · ×1
  • localFrameToFixedFrameGenerator::resultat (cyclomatic 16) packages/core/Source/FixedFrameTransforms.js:138 — localFrameToFixedFrameGenerator::resultat 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.
D17 · Explicit Debt · TodoComment · ×1
  • TodoComment packages/sandcastle/src/ConsoleMirror.tsx:46 — // TODO: determine if we need this lib or can implement ourselves. It's a little outdated — 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.
D2 · Cognitive Complexity · PolygonGeometry.computeAttributes (cognitive 209) · ×1
  • PolygonGeometry.computeAttributes (cognitive 209) packages/core/Source/PolygonGeometry.js:62 — PolygonGeometry.computeAttributes has cognitive complexity 209 (threshold 15). Drivers by points: if/else 51 (181 pts), boolean chains 14, ternaries 6 (12 pts), loops 1 (2 pts) (nesting depth added 137). 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 · buildVectorGltfFromMVT.buildVectorGltfFromMVT (cognitive 200) · ×1
  • buildVectorGltfFromMVT.buildVectorGltfFromMVT (cognitive 200) packages/engine/Source/Scene/buildVectorGltfFromMVT.js:80 — buildVectorGltfFromMVT.buildVectorGltfFromMVT has cognitive complexity 200 (threshold 15). Drivers by points: if/else 49 (98 pts), loops 22 (74 pts), ternaries 6 (20 pts), boolean chains 8 (nesting depth added 115). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 185) · ×1
  • update (cognitive 185) packages/engine/Source/Scene/BillboardCollection.js:1569 — update has cognitive complexity 185 (threshold 15). Drivers by points: if/else 61 (114 pts), boolean chains 30, loops 8 (22 pts), ternaries 7 (19 pts) (nesting depth added 79). Of this number, 184 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 · update (cognitive 152) · ×1
  • update (cognitive 152) packages/engine/Source/Scene/GaussianSplatPrimitive.js:1686 — update has cognitive complexity 152 (threshold 15). Drivers by points: if/else 45 (100 pts), boolean chains 16, loops 5 (15 pts), ternaries 4 (15 pts), match/switch 1 (5 pts), other 1 (nesting depth added 80). Of this number, 98 points are the body's own statements and 54 belong to 7 function items inside it that branch. 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 · addDrawCommandsForTile (cognitive 147) · ×1
  • addDrawCommandsForTile (cognitive 147) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510 — addDrawCommandsForTile has cognitive complexity 147 (threshold 15). Drivers by points: if/else 43 (80 pts), boolean chains 41, loops 6 (12 pts), ternaries 6 (11 pts), other 3 (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 · ChatPanel.ChatPanel (cognitive 135) · ×1
  • ChatPanel.ChatPanel (cognitive 135) packages/sandcastle/src/copilot/ChatPanel.tsx:152 — ChatPanel.ChatPanel has cognitive complexity 135 (threshold 15). Drivers by points: if/else 35 (44 pts), ternaries 18 (41 pts), boolean chains 35, loops 4 (7 pts), error handling 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 39). Most of this is not in the body itself: 9 of the 135 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 297, 437, 457, …). 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 · PathVisualizer.PolylineUpdater.updateObject (cognitive 114) · ×1
  • PathVisualizer.PolylineUpdater.updateObject (cognitive 114) packages/engine/Source/DataSources/PathVisualizer.js:898 — PathVisualizer.PolylineUpdater.updateObject has cognitive complexity 114 (threshold 15). Drivers by points: if/else 26 (73 pts), loops 9 (30 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 69). 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 · GlobeSurfaceShaderSet.getShaderProgram (cognitive 111) · ×1
  • GlobeSurfaceShaderSet.getShaderProgram (cognitive 111) packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105 — GlobeSurfaceShaderSet.getShaderProgram has cognitive complexity 111 (threshold 15). Drivers by points: if/else 49 (99 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EllipsoidGeometry.EllipsoidGeometry.createGeometry (cognitive 109) · ×1
  • EllipsoidGeometry.EllipsoidGeometry.createGeometry (cognitive 109) packages/core/Source/EllipsoidGeometry.js:231 — EllipsoidGeometry.EllipsoidGeometry.createGeometry has cognitive complexity 109 (threshold 15). Drivers by points: if/else 32 (64 pts), loops 17 (32 pts), boolean chains 7, ternaries 5 (6 pts) (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 · constructExtrudedRectangle (cognitive 106) · ×1
  • constructExtrudedRectangle (cognitive 106) packages/core/Source/RectangleGeometry.js:457 — constructExtrudedRectangle has cognitive complexity 106 (threshold 15). Drivers by points: if/else 40 (73 pts), loops 11 (18 pts), ternaries 10 (14 pts), boolean chains 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 106) · ×1
  • update (cognitive 106) packages/engine/Source/Scene/PointPrimitiveCollection.js:845 — update has cognitive complexity 106 (threshold 15). Drivers by points: if/else 31 (49 pts), boolean chains 22, loops 7 (21 pts), ternaries 5 (14 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useToolChainExecution.useToolChainExecution (cognitive 104) · ×1
  • useToolChainExecution.useToolChainExecution (cognitive 104) packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts:62 — useToolChainExecution.useToolChainExecution has cognitive complexity 104 (threshold 15). Drivers by points: if/else 30 (68 pts), ternaries 8 (19 pts), boolean chains 8, error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 53). Most of this is not in the body itself: 0 of the 104 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 170, 110, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · fromIso8601 (cognitive 103) · ×1
  • fromIso8601 (cognitive 103) packages/core/Source/JulianDate.js:312 — fromIso8601 has cognitive complexity 103 (threshold 15). Drivers by points: if/else 32 (66 pts), boolean chains 24, loops 6, ternaries 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 37). 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 · AnthropicClient.processSSEStream (cognitive 102) · ×1
  • AnthropicClient.processSSEStream (cognitive 102) packages/sandcastle/src/copilot/ai/clients/AnthropicClient.ts:181 — AnthropicClient.processSSEStream has cognitive complexity 102 (threshold 15). Drivers by points: if/else 17 (57 pts), ternaries 3 (18 pts), error handling 4 (13 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 65). 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 · VertexAIClient.processClaudeSSEStream (cognitive 102) · ×1
  • VertexAIClient.processClaudeSSEStream (cognitive 102) packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:866 — VertexAIClient.processClaudeSSEStream has cognitive complexity 102 (threshold 15). Drivers by points: if/else 17 (57 pts), ternaries 3 (18 pts), error handling 4 (13 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 65). 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 · executeCommands (cognitive 100) · ×1
  • executeCommands (cognitive 100) packages/engine/Source/Scene/Scene.js:2779 — executeCommands has cognitive complexity 100 (threshold 15). Drivers by points: if/else 38 (78 pts), boolean chains 11, ternaries 3 (8 pts), loops 3 (nesting depth added 45). Of this number, 98 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderState (cognitive 99) · ×1
  • RenderState (cognitive 99) packages/engine/Source/Renderer/RenderState.js:93 — RenderState has cognitive complexity 99 (threshold 15). Drivers by points: other 57, if/else 28 (32 pts), boolean chains 9, ternaries 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.
D2 · Cognitive Complexity · Expression.Node.getShaderExpression (cognitive 98) · ×1
  • Expression.Node.getShaderExpression (cognitive 98) REDACTED:1906 — Expression.Node.getShaderExpression has cognitive complexity 98 (threshold 15). Drivers by points: if/else 49 (86 pts), boolean chains 7, loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createElevationBandMaterial.createLayeredEntries (cognitive 97) · ×1
  • createElevationBandMaterial.createLayeredEntries (cognitive 97) packages/engine/Source/Scene/createElevationBandMaterial.js:202 — createElevationBandMaterial.createLayeredEntries has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (64 pts), ternaries 6 (18 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderBufferPolylineCollection (cognitive 96) · ×1
  • renderBufferPolylineCollection (cognitive 96) packages/engine/Source/Scene/renderBufferPolylineCollection.js:116 — renderBufferPolylineCollection has cognitive complexity 96 (threshold 15). Drivers by points: if/else 23 (44 pts), loops 8 (24 pts), ternaries 10 (23 pts), boolean chains 5 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleZoom (cognitive 95) · ×1
  • handleZoom (cognitive 95) packages/engine/Source/Scene/ScreenSpaceCameraController.js:561 — handleZoom has cognitive complexity 95 (threshold 15). Drivers by points: if/else 34 (70 pts), boolean chains 17, ternaries 2 (7 pts), other 1 (nesting depth added 41). 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 · Viewer (cognitive 95) · ×1
  • Viewer (cognitive 95) packages/widgets/Source/Viewer/Viewer.js:429 — Viewer has cognitive complexity 95 (threshold 15). Drivers by points: if/else 40 (55 pts), boolean chains 23, ternaries 5 (9 pts), other 5, error handling 1 (2 pts), loops 1 (nesting depth added 20). Of this number, 77 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeightmapTessellator.HeightmapTessellator.computeVertices (cognitive 93) · ×1
  • HeightmapTessellator.HeightmapTessellator.computeVertices (cognitive 93) packages/engine/Source/Core/HeightmapTessellator.js:117 — HeightmapTessellator.HeightmapTessellator.computeVertices has cognitive complexity 93 (threshold 15). Drivers by points: if/else 38 (70 pts), loops 5 (14 pts), boolean chains 6, ternaries 3 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · processNetworkLink (cognitive 93) · ×1
  • processNetworkLink (cognitive 93) packages/engine/Source/DataSources/KmlDataSource.js:2998 — processNetworkLink has cognitive complexity 93 (threshold 15). Drivers by points: if/else 22 (68 pts), error handling 2 (9 pts), other 6, ternaries 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 58). Of this number, 33 points are the body's own statements and 60 belong to 2 function literals inside it that branch. 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 · EdgeVisibilityPipelineStage.extractVisibleEdges (cognitive 84) · ×1
  • EdgeVisibilityPipelineStage.extractVisibleEdges (cognitive 84) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:348 — EdgeVisibilityPipelineStage.extractVisibleEdges has cognitive complexity 84 (threshold 15). Drivers by points: if/else 18 (52 pts), ternaries 5 (13 pts), loops 4 (10 pts), boolean chains 9 (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 · Cesium3DTilesInspectorViewModel (cognitive 84) · ×1
  • Cesium3DTilesInspectorViewModel (cognitive 84) packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js:167 — Cesium3DTilesInspectorViewModel has cognitive complexity 84 (threshold 15). Drivers by points: if/else 55 (75 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 24). Most of this is not in the body itself: 1 of the 84 points is its own statement and the rest belongs to 67 function items inside it that branch (set::(anonymous), set, set, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · StaticGeometryColorBatch.Batch.update (cognitive 83) · ×1
  • StaticGeometryColorBatch.Batch.update (cognitive 83) packages/engine/Source/DataSources/StaticGeometryColorBatch.js:124 — StaticGeometryColorBatch.Batch.update has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (70 pts), boolean chains 11, loops 1 (2 pts) (nesting depth added 46). 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 · KmlDataSource.processStyles (cognitive 83) · ×1
  • KmlDataSource.processStyles (cognitive 83) packages/engine/Source/DataSources/KmlDataSource.js:1216 — KmlDataSource.processStyles has cognitive complexity 83 (threshold 15). Drivers by points: if/else 17 (71 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 59). 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 · PolylineCollection.PolylineCollection.update (cognitive 82) · ×1
  • PolylineCollection.PolylineCollection.update (cognitive 82) packages/engine/Source/Scene/PolylineCollection.js:419 — PolylineCollection.PolylineCollection.update has cognitive complexity 82 (threshold 15). Drivers by points: if/else 20 (57 pts), loops 4 (11 pts), boolean chains 8, ternaries 1 (6 pts) (nesting depth added 49). 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 · PolylineGeometry.PolylineGeometry.createGeometry (cognitive 79) · ×1
  • PolylineGeometry.PolylineGeometry.createGeometry (cognitive 79) packages/core/Source/PolylineGeometry.js:294 — PolylineGeometry.PolylineGeometry.createGeometry has cognitive complexity 79 (threshold 15). Drivers by points: if/else 22 (39 pts), loops 7 (20 pts), ternaries 6 (13 pts), boolean chains 7 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCommandLists (cognitive 79) · ×1
  • createCommandLists (cognitive 79) packages/engine/Source/Scene/PolylineCollection.js:593 — createCommandLists has cognitive complexity 79 (threshold 15). Drivers by points: if/else 15 (46 pts), ternaries 4 (20 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointCloud.createShaders (cognitive 78) · ×1
  • PointCloud.createShaders (cognitive 78) REDACTED:770 — PointCloud.createShaders has cognitive complexity 78 (threshold 15). Drivers by points: if/else 55 (63 pts), boolean chains 11, loops 3, error handling 1 (nesting depth added 8). 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 · QuadtreePrimitive.updateHeights (cognitive 77) · ×1
  • QuadtreePrimitive.updateHeights (cognitive 77) packages/engine/Source/Scene/QuadtreePrimitive.js:1395 — QuadtreePrimitive.updateHeights has cognitive complexity 77 (threshold 15). Drivers by points: if/else 19 (66 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 50). 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 · subSampleSampledProperty (cognitive 77) · ×1
  • subSampleSampledProperty (cognitive 77) packages/engine/Source/DataSources/PathVisualizer.js:224 — subSampleSampledProperty has cognitive complexity 77 (threshold 15). Drivers by points: if/else 26 (66 pts), boolean chains 10, loops 1 (nesting depth added 40). 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 · write (cognitive 75) · ×1
  • write (cognitive 75) packages/engine/Source/Scene/PolylineCollection.js:1351 — write has cognitive complexity 75 (threshold 15). Drivers by points: if/else 16 (45 pts), ternaries 5 (14 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EllipseGeometry.computeTopBottomAttributes (cognitive 74) · ×1
  • EllipseGeometry.computeTopBottomAttributes (cognitive 74) packages/core/Source/EllipseGeometry.js:46 — EllipseGeometry.computeTopBottomAttributes has cognitive complexity 74 (threshold 15). Drivers by points: if/else 24 (57 pts), ternaries 8 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 36). 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 · EntityCluster.createDeclutterCallback (cognitive 73) · ×1
  • EntityCluster.createDeclutterCallback (cognitive 73) packages/engine/Source/DataSources/EntityCluster.js:225 — EntityCluster.createDeclutterCallback has cognitive complexity 73 (threshold 15). Drivers by points: if/else 24 (45 pts), loops 7 (23 pts), boolean chains 5 (nesting depth added 37). Most of this is not in the body itself: 0 of the 73 points are its own statements and the rest belongs to one function literal inside it that branches (line 226). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CesiumViewer.main (cognitive 71) · ×1
  • CesiumViewer.main (cognitive 71) Apps/CesiumViewer/CesiumViewer.js:24 — CesiumViewer.main has cognitive complexity 71 (threshold 15). Drivers by points: if/else 29 (42 pts), ternaries 6 (18 pts), boolean chains 7, error handling 2 (4 pts) (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 · Vector3DTilePoints.Vector3DTilePoints.applyStyle (cognitive 71) · ×1
  • Vector3DTilePoints.Vector3DTilePoints.applyStyle (cognitive 71) packages/engine/Source/Scene/Vector3DTilePoints.js:324 — Vector3DTilePoints.Vector3DTilePoints.applyStyle has cognitive complexity 71 (threshold 15). Drivers by points: if/else 38 (70 pts), loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createQuadEdgeGeometry (cognitive 71) · ×1
  • createQuadEdgeGeometry (cognitive 71) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:623 — createQuadEdgeGeometry has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 17 (25 pts), loops 8 (22 pts), if/else 15 (20 pts), boolean chains 4 (nesting depth added 27). Of this number, 61 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · splitLongitudePolyline (cognitive 69) · ×1
  • splitLongitudePolyline (cognitive 69) packages/core/Source/GeometryPipeline.js:2933 — splitLongitudePolyline has cognitive complexity 69 (threshold 15). Drivers by points: loops 10 (33 pts), if/else 12 (28 pts), ternaries 4 (8 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · visitTile (cognitive 69) · ×1
  • visitTile (cognitive 69) packages/engine/Source/Scene/QuadtreePrimitive.js:717 — visitTile has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (39 pts), ternaries 5 (13 pts), loops 2 (9 pts), boolean chains 8 (nesting depth added 38). 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 · Cesium3DTileset (cognitive 68) · ×1
  • Cesium3DTileset (cognitive 68) packages/engine/Source/Scene/Cesium3DTileset.js:212 — Cesium3DTileset has cognitive complexity 68 (threshold 15). Drivers by points: other 56, if/else 8, boolean chains 2, loops 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 · CylinderGeometry.CylinderGeometry.createGeometry (cognitive 67) · ×1
  • CylinderGeometry.CylinderGeometry.createGeometry (cognitive 67) packages/core/Source/CylinderGeometry.js:199 — CylinderGeometry.CylinderGeometry.createGeometry has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 7 (11 pts), ternaries 5 (6 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Expression.parseCall (cognitive 67) · ×1
  • Expression.parseCall (cognitive 67) REDACTED:652 — Expression.parseCall has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34 (57 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · I3SGeometry.I3SGeometry._generateGltf (cognitive 67) · ×1
  • I3SGeometry.I3SGeometry._generateGltf (cognitive 67) packages/engine/Source/Scene/I3SGeometry.js:290 — I3SGeometry.I3SGeometry._generateGltf has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 5 (18 pts), boolean chains 6 (nesting depth added 41). 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 · PolylineCollection.PolylineBucket.writeUpdate (cognitive 66) · ×1
  • PolylineCollection.PolylineBucket.writeUpdate (cognitive 66) packages/engine/Source/Scene/PolylineCollection.js:1807 — PolylineCollection.PolylineBucket.writeUpdate has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 10, ternaries 2 (6 pts), loops 2 (5 pts) (nesting depth added 35). 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 · VertexAIClient.geminiStreamRequest (cognitive 66) · ×1
  • VertexAIClient.geminiStreamRequest (cognitive 66) packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:457 — VertexAIClient.geminiStreamRequest has cognitive complexity 66 (threshold 15). Drivers by points: if/else 16 (35 pts), ternaries 5 (12 pts), error handling 3 (7 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addInterval (cognitive 66) · ×1
  • addInterval (cognitive 66) packages/core/Source/TimeIntervalCollection.js:310 — addInterval has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (36 pts), ternaries 4 (16 pts), boolean chains 13, loops 1 (nesting depth added 28). 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 · Label.reverseRtl (cognitive 64) · ×1
  • Label.reverseRtl (cognitive 64) packages/engine/Source/Scene/Label.js:1549 — Label.reverseRtl has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (55 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 36). 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 · StaticOutlineGeometryBatch.Batch.update (cognitive 64) · ×1
  • StaticOutlineGeometryBatch.Batch.update (cognitive 64) packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:83 — StaticOutlineGeometryBatch.Batch.update has cognitive complexity 64 (threshold 15). Drivers by points: if/else 20 (54 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 35). 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 · ModelVisualizer.ModelVisualizer.update (cognitive 64) · ×1
  • ModelVisualizer.ModelVisualizer.update (cognitive 64) packages/engine/Source/DataSources/ModelVisualizer.js:133 — ModelVisualizer.ModelVisualizer.update has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (51 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Timeline.Timeline._makeTics (cognitive 64) · ×1
  • Timeline.Timeline._makeTics (cognitive 64) packages/widgets/Source/Timeline/Timeline.js:407 — Timeline.Timeline._makeTics has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (48 pts), loops 6 (12 pts), boolean chains 4 (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 · Texture (cognitive 63) · ×1
  • Texture (cognitive 63) packages/engine/Source/Renderer/Texture.js:50 — Texture has cognitive complexity 63 (threshold 15). Drivers by points: if/else 33 (44 pts), boolean chains 14, other 4, ternaries 1 (nesting depth added 11). 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 · StaticGeometryPerMaterialBatch.Batch.update (cognitive 62) · ×1
  • StaticGeometryPerMaterialBatch.Batch.update (cognitive 62) packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:128 — StaticGeometryPerMaterialBatch.Batch.update has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (54 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 34). 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 · EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry (cognitive 60) · ×1
  • EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry (cognitive 60) packages/core/Source/EllipsoidOutlineGeometry.js:223 — EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry has cognitive complexity 60 (threshold 15). Drivers by points: loops 20 (37 pts), if/else 14 (18 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 22). 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 · CorridorGeometry.combine (cognitive 59) · ×1
  • CorridorGeometry.combine (cognitive 59) packages/core/Source/CorridorGeometry.js:59 — CorridorGeometry.combine has cognitive complexity 59 (threshold 15). Drivers by points: loops 17 (40 pts), if/else 13 (16 pts), ternaries 3 (nesting depth added 26). 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 · App.App (cognitive 59) · ×1
  • App.App (cognitive 59) packages/sandcastle/src/App.tsx:123 — App.App has cognitive complexity 59 (threshold 15). Drivers by points: if/else 27 (28 pts), boolean chains 16, ternaries 11 (13 pts), error handling 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 43 belong to 20 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh (cognitive 58) · ×1
  • upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh (cognitive 58) packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js:38 — upsampleQuantizedTerrainMesh.upsampleQuantizedTerrainMesh has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 7, ternaries 7, loops 6 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · processProperty (cognitive 58) · ×1
  • processProperty (cognitive 58) packages/engine/Source/DataSources/CzmlDataSource.js:671 — processProperty has cognitive complexity 58 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 10, ternaries 3 (9 pts), other 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelAnimationCollection.ModelAnimationCollection.update (cognitive 57) · ×1
  • ModelAnimationCollection.ModelAnimationCollection.update (cognitive 57) packages/engine/Source/Scene/Model/ModelAnimationCollection.js:405 — ModelAnimationCollection.ModelAnimationCollection.update has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (43 pts), boolean chains 9, ternaries 1 (3 pts), loops 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 57) · ×1
  • update (cognitive 57) packages/engine/Source/Scene/GroundPrimitive.js:689 — update has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 5 (15 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 30). Of this number, 52 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderBufferPolygonCollection.renderBufferPolygonCollection (cognitive 56) · ×1
  • renderBufferPolygonCollection.renderBufferPolygonCollection (cognitive 56) packages/engine/Source/Scene/renderBufferPolygonCollection.js:90 — renderBufferPolygonCollection.renderBufferPolygonCollection has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 7 (19 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands (cognitive 56) · ×1
  • Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands (cognitive 56) REDACTED:850 — Cesium3DTileBatchTable.Cesium3DTileBatchTable.addDerivedCommands has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (48 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 32). 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 · ImageryLayer.ImageryLayer._createTileImagerySkeletons (cognitive 56) · ×1
  • ImageryLayer.ImageryLayer._createTileImagerySkeletons (cognitive 56) packages/engine/Source/Scene/ImageryLayer.js:688 — ImageryLayer.ImageryLayer._createTileImagerySkeletons has cognitive complexity 56 (threshold 15). Drivers by points: if/else 29 (39 pts), boolean chains 14, loops 2 (3 pts) (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 · SampledProperty.SampledProperty.getValue (cognitive 56) · ×1
  • SampledProperty.SampledProperty.getValue (cognitive 56) packages/engine/Source/DataSources/SampledProperty.js:368 — SampledProperty.SampledProperty.getValue has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 28). 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 · EntityView.updateTransform (cognitive 56) · ×1
  • EntityView.updateTransform (cognitive 56) packages/engine/Source/DataSources/EntityView.js:35 — EntityView.updateTransform has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (48 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 29). 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 · buildVectorGltfFromMVT · ×1
  • buildVectorGltfFromMVT::buildStructuralMetadata (cognitive 56) packages/engine/Source/Scene/buildVectorGltfFromMVT.js:282 — buildVectorGltfFromMVT::buildStructuralMetadata has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (33 pts), loops 8 (17 pts), ternaries 1 (4 pts), boolean chains 2 (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 · ShaderProgram.findUniforms (cognitive 55) · ×1
  • ShaderProgram.findUniforms (cognitive 55) packages/engine/Source/Renderer/ShaderProgram.js:301 — ShaderProgram.findUniforms has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (47 pts), loops 2 (6 pts), ternaries 1 (2 pts) (nesting depth added 40). 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 · TerrainFillMesh.propagateEdge (cognitive 55) · ×1
  • TerrainFillMesh.propagateEdge (cognitive 55) packages/engine/Source/Scene/TerrainFillMesh.js:504 — TerrainFillMesh.propagateEdge has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 8 (16 pts), boolean chains 6, match/switch 2 (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 · processPositionProperty (cognitive 55) · ×1
  • processPositionProperty (cognitive 55) packages/engine/Source/DataSources/CzmlDataSource.js:913 — processPositionProperty has cognitive complexity 55 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 11, other 2, ternaries 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 · decodeDraco (cognitive 55) · ×1
  • decodeDraco (cognitive 55) REDACTED:1168 — decodeDraco has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (31 pts), ternaries 5 (15 pts), error handling 1 (3 pts), loops 1 (3 pts), boolean chains 2, other 1 (nesting depth added 34). Most of this is not in the body itself: 7 of the 55 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1179, 1263). 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 · Expression.setEvaluateFunction (cognitive 54) · ×1
  • Expression.setEvaluateFunction (cognitive 54) REDACTED:955 — Expression.setEvaluateFunction has cognitive complexity 54 (threshold 15). Drivers by points: if/else 49 (54 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, 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 · getCornerFromEdge (cognitive 54) · ×1
  • getCornerFromEdge (cognitive 54) packages/engine/Source/Scene/TerrainFillMesh.js:2033 — getCornerFromEdge has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 8 (22 pts), boolean chains 2 (nesting depth added 30). Of this number, 46 points are the body's own statements and 8 belong to one function literal inside it that branches. 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 · StaticGroundPolylinePerMaterialBatch.Batch.update (cognitive 53) · ×1
  • StaticGroundPolylinePerMaterialBatch.Batch.update (cognitive 53) packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:125 — StaticGroundPolylinePerMaterialBatch.Batch.update has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (47 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 29). 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 · PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy (cognitive 52) · ×1
  • PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy (cognitive 52) packages/core/Source/PolygonGeometryLibrary.js:774 — PolygonGeometryLibrary.PolygonGeometryLibrary.polygonsFromHierarchy has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 6 (17 pts), ternaries 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry (cognitive 52) · ×1
  • PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry (cognitive 52) packages/core/Source/PolygonGeometryLibrary.js:1050 — PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 7 (18 pts), ternaries 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrimitivePipeline.geometryPipeline (cognitive 52) · ×1
  • PrimitivePipeline.geometryPipeline (cognitive 52) packages/engine/Source/Scene/PrimitivePipeline.js:89 — PrimitivePipeline.geometryPipeline has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 8 (15 pts), boolean chains 5 (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 · Vector3DTileGeometry.createPrimitive (cognitive 52) · ×1
  • Vector3DTileGeometry.createPrimitive (cognitive 52) packages/engine/Source/Scene/Vector3DTileGeometry.js:221 — Vector3DTileGeometry.createPrimitive has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (33 pts), ternaries 8 (16 pts), loops 1 (3 pts) (nesting depth added 27). Of this number, 45 points are the body's own statements and 7 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 · recurseEntities (cognitive 52) · ×1
  • recurseEntities (cognitive 52) packages/engine/Source/DataSources/exportKml.js:416 — recurseEntities has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 4 (11 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseMetadataSuccess (cognitive 52) · ×1
  • parseMetadataSuccess (cognitive 52) packages/engine/Source/Core/CesiumTerrainProvider.js:119 — parseMetadataSuccess has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, ternaries 5 (10 pts), loops 2 (5 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 · GeminiClient.streamRequest (cognitive 51) · ×1
  • GeminiClient.streamRequest (cognitive 51) packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:168 — GeminiClient.streamRequest has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), error handling 3 (7 pts), loops 3 (7 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildGallery.buildGalleryList (cognitive 50) · ×1
  • buildGallery.buildGalleryList (cognitive 50) packages/sandcastle/scripts/buildGallery.js:103 — buildGallery.buildGalleryList has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 7, error handling 3 (5 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 18). Of this number, 49 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 · SimplePolylineGeometry.SimplePolylineGeometry.createGeometry (cognitive 50) · ×1
  • SimplePolylineGeometry.SimplePolylineGeometry.createGeometry (cognitive 50) packages/core/Source/SimplePolylineGeometry.js:253 — SimplePolylineGeometry.SimplePolylineGeometry.createGeometry has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 6 (18 pts), boolean chains 4 (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 · decodeMVT.decodeGeometry (cognitive 50) · ×1
  • decodeMVT.decodeGeometry (cognitive 50) packages/engine/Source/Scene/decodeMVT.js:302 — decodeMVT.decodeGeometry has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 6 (18 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createTracks (cognitive 50) · ×1
  • createTracks (cognitive 50) packages/engine/Source/DataSources/exportKml.js:629 — createTracks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (28 pts), loops 6 (14 pts), ternaries 2 (4 pts), boolean chains 3, other 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 · Tipsify.Tipsify.tipsify (cognitive 49) · ×1
  • Tipsify.Tipsify.tipsify (cognitive 49) packages/core/Source/Tipsify.js:119 — Tipsify.Tipsify.tipsify has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 10 (15 pts), boolean chains 2 (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 · WallGeometry.WallGeometry.createGeometry (cognitive 49) · ×1
  • WallGeometry.WallGeometry.createGeometry (cognitive 49) packages/core/Source/WallGeometry.js:352 — WallGeometry.WallGeometry.createGeometry has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (41 pts), ternaries 5, loops 2, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FramebufferManager.FramebufferManager.destroy (cognitive 49) · ×1
  • FramebufferManager.FramebufferManager.destroy (cognitive 49) packages/engine/Source/Renderer/FramebufferManager.js:424 — FramebufferManager.FramebufferManager.destroy has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 12, loops 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 · StaticGroundGeometryColorBatch.Batch.update (cognitive 49) · ×1
  • StaticGroundGeometryColorBatch.Batch.update (cognitive 49) packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:91 — StaticGroundGeometryColorBatch.Batch.update has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (42 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 26). 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 · Model (cognitive 49) · ×1
  • Model (cognitive 49) packages/engine/Source/Scene/Model/Model.js:199 — Model has cognitive complexity 49 (threshold 15). Drivers by points: other 33, if/else 9, boolean chains 5, ternaries 2. 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 · loadAsynchronous (cognitive 49) · ×1
  • loadAsynchronous (cognitive 49) packages/engine/Source/Scene/Primitive.js:1153 — loadAsynchronous has cognitive complexity 49 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (14 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts), other 1 (nesting depth added 26). Of this number, 45 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CesiumWidget (cognitive 49) · ×1
  • CesiumWidget (cognitive 49) packages/engine/Source/Widget/CesiumWidget.js:209 — CesiumWidget has cognitive complexity 49 (threshold 15). Drivers by points: if/else 23 (29 pts), other 9, boolean chains 6, ternaries 3, error handling 1, loops 1 (nesting depth added 6). Of this number, 47 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer (cognitive 48) · ×1
  • createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer (cognitive 48) packages/engine/Source/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js:89 — createVerticesFromGoogleEarthEnterpriseBuffer.processBuffer has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 5 (7 pts), boolean chains 3, ternaries 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · update (cognitive 48) · ×1
  • update (cognitive 48) packages/engine/Source/DataSources/EllipsoidGeometryUpdater.js:388 — update has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 9, ternaries 3 (4 pts), other 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 · GroundPolylineGeometry.generateGeometryAttributes (cognitive 47) · ×1
  • GroundPolylineGeometry.generateGeometryAttributes (cognitive 47) packages/engine/Source/Core/GroundPolylineGeometry.js:1058 — GroundPolylineGeometry.generateGeometryAttributes has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 6 (9 pts), ternaries 3 (7 pts), boolean chains 4 (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 · processDescription (cognitive 47) · ×1
  • processDescription (cognitive 47) packages/engine/Source/DataSources/KmlDataSource.js:2087 — processDescription has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (22 pts), other 10, loops 3 (8 pts), ternaries 1 (6 pts), boolean chains 1 (nesting depth added 22). 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 · clipTileFromQuadrant (cognitive 47) · ×1
  • clipTileFromQuadrant (cognitive 47) packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js:1659 — clipTileFromQuadrant has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 6 (13 pts), loops 3 (5 pts), boolean chains 1 (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 · fromGeometry (cognitive 47) · ×1
  • fromGeometry (cognitive 47) packages/engine/Source/Renderer/VertexArray.js:577 — fromGeometry has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 2 (5 pts), other 5, boolean chains 3, ternaries 1 (nesting depth added 23). 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 · CesiumInspectorViewModel (cognitive 47) · ×1
  • CesiumInspectorViewModel (cognitive 47) packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js:67 — CesiumInspectorViewModel has cognitive complexity 47 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 7, loops 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 32 function items inside it that branch (selectTile, (anonymous), (anonymous)::debugCommandFilter, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CorridorGeometry.extrudedAttributes (cognitive 46) · ×1
  • CorridorGeometry.extrudedAttributes (cognitive 46) packages/core/Source/CorridorGeometry.js:530 — CorridorGeometry.extrudedAttributes has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 4 (10 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · View.View.createPotentiallyVisibleSet (cognitive 46) · ×1
  • View.View.createPotentiallyVisibleSet (cognitive 46) packages/engine/Source/Scene/View.js:287 — View.View.createPotentiallyVisibleSet has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 7 (9 pts), boolean chains 3, ternaries 1 (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 · BaseLayerPickerViewModel.BaseLayerPickerViewModel (cognitive 46) · ×1
  • BaseLayerPickerViewModel.BaseLayerPickerViewModel (cognitive 46) packages/widgets/Source/BaseLayerPicker/BaseLayerPickerViewModel.js:25 — BaseLayerPickerViewModel.BaseLayerPickerViewModel has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 7 (10 pts), boolean chains 2, ternaries 2 (nesting depth added 14). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 180, 73, 104, …). 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 · repositionAllGlyphs (cognitive 46) · ×1
  • repositionAllGlyphs (cognitive 46) packages/engine/Source/Scene/LabelCollection.js:382 — repositionAllGlyphs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (41 pts), loops 2, ternaries 2, boolean chains 1 (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 · processScreenOverlay · ×1
  • processScreenOverlay::onload (cognitive 45) packages/engine/Source/DataSources/KmlDataSource.js:2499 — processScreenOverlay::onload has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25 (43 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Framebuffer.Framebuffer (cognitive 44) · ×1
  • Framebuffer.Framebuffer (cognitive 44) packages/engine/Source/Renderer/Framebuffer.js:86 — Framebuffer.Framebuffer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 10, 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 · DiffMatcher.fuzzyMatch (cognitive 44) · ×1
  • DiffMatcher.fuzzyMatch (cognitive 44) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:250 — DiffMatcher.fuzzyMatch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 9, loops 3 (6 pts), ternaries 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 · updateEnvironment (cognitive 44) · ×1
  • updateEnvironment (cognitive 44) packages/engine/Source/Scene/Scene.js:3719 — updateEnvironment has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 14, ternaries 6 (11 pts), 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 · update (cognitive 44) · ×1
  • update (cognitive 44) packages/engine/Source/Scene/Primitive.js:2083 — update has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 14, other 4, 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, 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 · _clipRingToRect (cognitive 44) · ×1
  • _clipRingToRect (cognitive 44) packages/engine/Source/Core/VectorPipeline.js:1072 — _clipRingToRect has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 10 (27 pts), if/else 6 (14 pts), loops 2 (3 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 · Scene.updateAndClearFramebuffers (cognitive 43) · ×1
  • Scene.updateAndClearFramebuffers (cognitive 43) packages/engine/Source/Scene/Scene.js:3963 — Scene.updateAndClearFramebuffers has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 14 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _onEntityPropertyChanged (cognitive 43) · ×1
  • _onEntityPropertyChanged (cognitive 43) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:478 — _onEntityPropertyChanged has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 8, ternaries 4 (8 pts), other 6 (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 · PolygonPipeline.PolygonPipeline.computeSubdivision (cognitive 42) · ×1
  • PolygonPipeline.PolygonPipeline.computeSubdivision (cognitive 42) packages/core/Source/PolygonPipeline.js:103 — PolygonPipeline.PolygonPipeline.computeSubdivision has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 2 (nesting depth added 26). 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. This shape REPEATS in the file: one other method here (PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision) 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 · PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision (cognitive 42) · ×1
  • PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision (cognitive 42) packages/core/Source/PolygonPipeline.js:338 — PolygonPipeline.PolygonPipeline.computeRhumbLineSubdivision has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 2 (nesting depth added 26). 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. This shape REPEATS in the file: one other method here (PolygonPipeline.PolygonPipeline.computeSubdivision) 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 · RectangleGeometry.constructRectangle (cognitive 42) · ×1
  • RectangleGeometry.constructRectangle (cognitive 42) packages/core/Source/RectangleGeometry.js:220 — RectangleGeometry.constructRectangle has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 7 (14 pts), boolean chains 4, ternaries 2 (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 · Geometry3DTileContent.getBatchIds (cognitive 42) · ×1
  • Geometry3DTileContent.getBatchIds (cognitive 42) packages/engine/Source/Scene/Geometry3DTileContent.js:193 — Geometry3DTileContent.getBatchIds has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (14 pts), loops 4 (12 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 · KmlDataSource.computeFinalStyle (cognitive 42) · ×1
  • KmlDataSource.computeFinalStyle (cognitive 42) packages/engine/Source/DataSources/KmlDataSource.js:1118 — KmlDataSource.computeFinalStyle has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 24). 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 · ChatMessage.ChatMessage (cognitive 42) · ×1
  • ChatMessage.ChatMessage (cognitive 42) packages/sandcastle/src/copilot/ChatMessage.tsx:19 — ChatMessage.ChatMessage has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 25, if/else 9 (13 pts), ternaries 2, error handling 1, loops 1 (nesting depth added 4). Of this number, 31 points are the body's own statements and 11 belong to 6 function literals inside it that branch. 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 · Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold (cognitive 41) · ×1
  • Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold (cognitive 41) packages/core/Source/Intersections2D.js:40 — Intersections2D.Intersections2D.clipTriangleAtAxisAlignedThreshold has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 3 (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 · StaticGroundGeometryPerMaterialBatch.Batch.update (cognitive 41) · ×1
  • StaticGroundGeometryPerMaterialBatch.Batch.update (cognitive 41) packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:137 — StaticGroundGeometryPerMaterialBatch.Batch.update has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 21). 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 · main.buildCategoryPanel (cognitive 41) · ×1
  • main.buildCategoryPanel (cognitive 41) REDACTED:64 — main.buildCategoryPanel has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 16). Of this number, 19 points are the body's own statements and 22 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createGeometry (cognitive 41) · ×1
  • createGeometry (cognitive 41) packages/engine/Source/Core/GroundPolylineGeometry.js:461 — createGeometry has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 8, loops 4 (5 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 · Texture3D (cognitive 41) · ×1
  • Texture3D (cognitive 41) packages/engine/Source/Renderer/Texture3D.js:56 — Texture3D has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 8, other 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EllipseGeometry.computeWallAttributes (cognitive 40) · ×1
  • EllipseGeometry.computeWallAttributes (cognitive 40) packages/core/Source/EllipseGeometry.js:450 — EllipseGeometry.computeWallAttributes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 6 (8 pts), loops 2 (3 pts), boolean chains 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 · LabelCollection.rebindAllGlyphs (cognitive 40) · ×1
  • LabelCollection.rebindAllGlyphs (cognitive 40) packages/engine/Source/Scene/LabelCollection.js:139 — LabelCollection.rebindAllGlyphs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 4 (12 pts), boolean chains 3 (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 · CzmlDataSource.processMaterialProperty (cognitive 40) · ×1
  • CzmlDataSource.processMaterialProperty (cognitive 40) packages/engine/Source/DataSources/CzmlDataSource.js:1200 — CzmlDataSource.processMaterialProperty has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28 (40 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 · I3SSymbology.buildUniqueValueHash (cognitive 40) · ×1
  • I3SSymbology.buildUniqueValueHash (cognitive 40) packages/engine/Source/Scene/I3SSymbology.js:107 — I3SSymbology.buildUniqueValueHash has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 5 (19 pts) (nesting depth added 29). 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 · applyStyle (cognitive 40) · ×1
  • applyStyle (cognitive 40) packages/engine/Source/DataSources/KmlDataSource.js:1012 — applyStyle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (31 pts), other 7, boolean chains 1, loops 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 · getUniformType (cognitive 40) · ×1
  • getUniformType (cognitive 40) packages/engine/Source/Scene/Material.js:1257 — getUniformType has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 7, loops 1 (4 pts) (nesting depth added 18). 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 · renderBufferPointCollection.renderBufferPointCollection (cognitive 39) · ×1
  • renderBufferPointCollection.renderBufferPointCollection (cognitive 39) packages/engine/Source/Scene/renderBufferPointCollection.js:90 — renderBufferPointCollection.renderBufferPointCollection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 4 (8 pts), boolean chains 6, ternaries 3 (4 pts) (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 · VectorGltf3DTileContent.applyStyle (cognitive 39) · ×1
  • VectorGltf3DTileContent.applyStyle (cognitive 39) packages/engine/Source/Scene/VectorGltf3DTileContent.js:243 — VectorGltf3DTileContent.applyStyle has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 6 (9 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EllipsoidPrimitive.EllipsoidPrimitive.update (cognitive 39) · ×1
  • EllipsoidPrimitive.EllipsoidPrimitive.update (cognitive 39) packages/engine/Source/Scene/EllipsoidPrimitive.js:245 — EllipsoidPrimitive.EllipsoidPrimitive.update has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 10 (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 · GlobeSurfaceTileProvider.updateTileBoundingRegion (cognitive 39) · ×1
  • GlobeSurfaceTileProvider.updateTileBoundingRegion (cognitive 39) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1702 — GlobeSurfaceTileProvider.updateTileBoundingRegion has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 7, loops 1 (2 pts) (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 · compressVertices (cognitive 39) · ×1
  • compressVertices (cognitive 39) packages/core/Source/GeometryPipeline.js:1480 — compressVertices has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 4, ternaries 4, loops 2 (3 pts) (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 · createFillMesh (cognitive 39) · ×1
  • createFillMesh (cognitive 39) packages/engine/Source/Scene/TerrainFillMesh.js:824 — createFillMesh has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 8 (11 pts), ternaries 3 (8 pts), boolean chains 2 (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 · createResources (cognitive 39) · ×1
  • createResources (cognitive 39) REDACTED:355 — createResources has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (26 pts), ternaries 5 (10 pts), loops 1 (2 pts), boolean chains 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 · QuarticRealPolynomial.original (cognitive 38) · ×1
  • QuarticRealPolynomial.original (cognitive 38) packages/core/Source/QuarticRealPolynomial.js:75 — QuarticRealPolynomial.original has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 6 (nesting depth added 17). 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 · Camera.updateMembers (cognitive 38) · ×1
  • Camera.updateMembers (cognitive 38) packages/engine/Source/Scene/Camera.js:659 — Camera.updateMembers has cognitive complexity 38 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 10 (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 · publish.publish (cognitive 37) · ×1
  • publish.publish (cognitive 37) Tools/jsdoc/cesium_template/publish.js:267 — publish.publish has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 9, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 296, 362, 467, …). 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 · PolygonGeometry.PolygonGeometry.createGeometry (cognitive 37) · ×1
  • PolygonGeometry.PolygonGeometry.createGeometry (cognitive 37) packages/core/Source/PolygonGeometry.js:1276 — PolygonGeometry.PolygonGeometry.createGeometry has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (11 pts), loops 3 (7 pts), boolean chains 3 (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 · Fullscreen.Fullscreen.supportsFullscreen (cognitive 37) · ×1
  • Fullscreen.Fullscreen.supportsFullscreen (cognitive 37) packages/engine/Source/Core/Fullscreen.js:117 — Fullscreen.Fullscreen.supportsFullscreen has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (36 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScreenSpaceCameraController.rotateCVOnTerrain (cognitive 37) · ×1
  • ScreenSpaceCameraController.rotateCVOnTerrain (cognitive 37) packages/engine/Source/Scene/ScreenSpaceCameraController.js:1503 — ScreenSpaceCameraController.rotateCVOnTerrain has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 4 (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 · ScreenSpaceCameraController.pan3D (cognitive 37) · ×1
  • ScreenSpaceCameraController.pan3D (cognitive 37) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2104 — ScreenSpaceCameraController.pan3D has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 8 (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 · I3SSymbology.parseSymbol (cognitive 37) · ×1
  • I3SSymbology.parseSymbol (cognitive 37) packages/engine/Source/Scene/I3SSymbology.js:57 — I3SSymbology.parseSymbol has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (34 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 26). 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 · createTexture2DUpdateFunction (cognitive 37) · ×1
  • createTexture2DUpdateFunction (cognitive 37) packages/engine/Source/Scene/Material.js:900 — createTexture2DUpdateFunction has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 10 (nesting depth added 12). Most of this is not in the body itself: 0 of the 37 points are its own statements and the rest belongs to one function literal inside it that branches (line 902). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · update (cognitive 37) · ×1
  • update (cognitive 37) packages/engine/Source/DataSources/PathVisualizer.js:1268 — update has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 4, loops 3 (4 pts) (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 · fireTouchEvents (cognitive 37) · ×1
  • fireTouchEvents (cognitive 37) packages/engine/Source/Core/ScreenSpaceEventHandler.js:544 — fireTouchEvents has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 5 (nesting depth added 17). Of this number, 28 points are the body's own statements and 9 belong to one function literal inside it that branches. 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 · createObject (cognitive 37) · ×1
  • createObject (cognitive 37) packages/engine/Source/DataSources/GeoJsonDataSource.js:115 — createObject has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · addAttribute (cognitive 37) · ×1
  • addAttribute (cognitive 37) packages/engine/Source/Renderer/VertexArray.js:22 — addAttribute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 9, other 7, match/switch 1 (2 pts), ternaries 2 (nesting depth added 4). Of this number, 33 points are the body's own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FramebufferManager.FramebufferManager.update (cognitive 36) · ×1
  • FramebufferManager.FramebufferManager.update (cognitive 36) packages/engine/Source/Renderer/FramebufferManager.js:132 — FramebufferManager.FramebufferManager.update has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 16). 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 · Cesium3DTilesetSkipTraversal.traverseAndSelect (cognitive 36) · ×1
  • Cesium3DTilesetSkipTraversal.traverseAndSelect (cognitive 36) packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js:353 — Cesium3DTilesetSkipTraversal.traverseAndSelect has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointVisualizer.PointVisualizer.update (cognitive 36) · ×1
  • PointVisualizer.PointVisualizer.update (cognitive 36) packages/engine/Source/DataSources/PointVisualizer.js:77 — PointVisualizer.PointVisualizer.update has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 6, 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 · Scene.executeCommand (cognitive 36) · ×1
  • Scene.executeCommand (cognitive 36) packages/engine/Source/Scene/Scene.js:2276 — Scene.executeCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 10 (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 · GalleryItemStore.useGalleryItemStore (cognitive 36) · ×1
  • GalleryItemStore.useGalleryItemStore (cognitive 36) packages/sandcastle/src/Gallery/GalleryItemStore.ts:49 — GalleryItemStore.useGalleryItemStore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 6, loops 1 (2 pts), ternaries 2 (nesting depth added 10). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 166, 108, 220, …). 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 · DiffMatcher.lineTrimmedMatch (cognitive 36) · ×1
  • DiffMatcher.lineTrimmedMatch (cognitive 36) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:170 — DiffMatcher.lineTrimmedMatch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 5 (11 pts), loops 3 (6 pts), boolean chains 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 · getNetworkLinkUpdateCallback (cognitive 36) · ×1
  • getNetworkLinkUpdateCallback (cognitive 36) packages/engine/Source/DataSources/KmlDataSource.js:3991 — getNetworkLinkUpdateCallback has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 3, error handling 1 (3 pts), loops 3, other 2 (nesting depth added 11). Most of this is not in the body itself: 0 of the 36 points are its own statements and the rest belongs to 2 function items inside it that branch ((anonymous), (anonymous)::removeChildren). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · modifyForEncodedNormals (cognitive 36) · ×1
  • modifyForEncodedNormals (cognitive 36) packages/engine/Source/Scene/Primitive.js:1009 — modifyForEncodedNormals has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 9 (19 pts), if/else 8 (11 pts), boolean chains 6 (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 · wirePolygon (cognitive 36) · ×1
  • wirePolygon (cognitive 36) packages/core/Source/PolygonGeometryLibrary.js:615 — wirePolygon has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 3 (8 pts), boolean chains 4, loops 3 (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 · GeometryPipeline.combineGeometries (cognitive 35) · ×1
  • GeometryPipeline.combineGeometries (cognitive 35) packages/core/Source/GeometryPipeline.js:939 — GeometryPipeline.combineGeometries has cognitive complexity 35 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 8 (15 pts), ternaries 1 (nesting depth added 17). 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 · getStringFromTypedArray.utf8Handler (cognitive 35) · ×1
  • getStringFromTypedArray.utf8Handler (cognitive 35) packages/core/Source/getStringFromTypedArray.js:68 — getStringFromTypedArray.utf8Handler has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeoJsonLoader.parse (cognitive 35) · ×1
  • GeoJsonLoader.parse (cognitive 35) packages/engine/Source/Scene/Model/GeoJsonLoader.js:531 — GeoJsonLoader.parse has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 8 (17 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess (cognitive 35) · ×1
  • TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess (cognitive 35) packages/engine/Source/Scene/TileMapServiceImageryProvider.js:216 — TileMapServiceImageryProvider.TileMapServiceImageryProvider._metadataSuccess has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (26 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 · CzmlDataSource.getPropertyType (cognitive 35) · ×1
  • CzmlDataSource.getPropertyType (cognitive 35) packages/engine/Source/DataSources/CzmlDataSource.js:431 — CzmlDataSource.getPropertyType has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, boolean chains 5. 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 · KmlDataSource.processGroundOverlay (cognitive 35) · ×1
  • KmlDataSource.processGroundOverlay (cognitive 35) packages/engine/Source/DataSources/KmlDataSource.js:2619 — KmlDataSource.processGroundOverlay has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (34 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 · ScreenSpaceCameraController.tilt3DOnTerrain (cognitive 35) · ×1
  • ScreenSpaceCameraController.tilt3DOnTerrain (cognitive 35) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2550 — ScreenSpaceCameraController.tilt3DOnTerrain has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 3, ternaries 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 · splitLongitudeTriangles (cognitive 35) · ×1
  • splitLongitudeTriangles (cognitive 35) packages/core/Source/GeometryPipeline.js:2411 — splitLongitudeTriangles has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 7 (10 pts), loops 4 (6 pts), boolean chains 2 (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 · visitRenderedTiles (cognitive 35) · ×1
  • visitRenderedTiles (cognitive 35) packages/engine/Source/Scene/TerrainFillMesh.js:230 — visitRenderedTiles has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 3, loops 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 · I3SLayer.I3SLayer._computeGeometryDefinitions (cognitive 34) · ×1
  • I3SLayer.I3SLayer._computeGeometryDefinitions (cognitive 34) packages/engine/Source/Scene/I3SLayer.js:205 — I3SLayer.I3SLayer._computeGeometryDefinitions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (15 pts), boolean chains 3 (nesting depth added 21). Of this number, 28 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiKeyDialog.ApiKeyDialogBody (cognitive 34) · ×1
  • ApiKeyDialog.ApiKeyDialogBody (cognitive 34) packages/sandcastle/src/copilot/ApiKeyDialog.tsx:45 — ApiKeyDialog.ApiKeyDialogBody has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 9, if/else 9, error handling 4 (nesting depth added 3). Most of this is not in the body itself: 10 of the 34 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 140, 90, 115, …). 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 · loadPrimitive (cognitive 34) · ×1
  • loadPrimitive (cognitive 34) packages/engine/Source/Scene/GltfLoader.js:2311 — loadPrimitive has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4, loops 2 (4 pts), other 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 · Cesium3DTile (cognitive 34) · ×1
  • Cesium3DTile (cognitive 34) packages/engine/Source/Scene/Cesium3DTile.js:63 — Cesium3DTile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 8 (10 pts), boolean chains 5 (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 · Billboard (cognitive 34) · ×1
  • Billboard (cognitive 34) packages/engine/Source/Scene/Billboard.js:100 — Billboard has cognitive complexity 34 (threshold 15). Drivers by points: other 18, if/else 11 (15 pts), boolean chains 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 · updateDerivedCommands (cognitive 34) · ×1
  • updateDerivedCommands (cognitive 34) packages/engine/Source/Scene/GlobeTranslucencyState.js:780 — updateDerivedCommands has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (22 pts), other 6, boolean chains 4, loops 1 (2 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 · QuarticRealPolynomial.neumark (cognitive 33) · ×1
  • QuarticRealPolynomial.neumark (cognitive 33) packages/core/Source/QuarticRealPolynomial.js:169 — QuarticRealPolynomial.neumark has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 6 (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 · OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo (cognitive 33) · ×1
  • OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo (cognitive 33) packages/core/Source/OrientedBoundingBox.js:737 — OrientedBoundingBox.OrientedBoundingBox.distanceSquaredTo has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28 (33 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, 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 · CoplanarPolygonGeometry.createGeometryFromPolygon (cognitive 33) · ×1
  • CoplanarPolygonGeometry.createGeometryFromPolygon (cognitive 33) packages/core/Source/CoplanarPolygonGeometry.js:41 — CoplanarPolygonGeometry.createGeometryFromPolygon has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 4, boolean chains 2, 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 · PolylineCollection.PolylineBucket.writeForMorph (cognitive 33) · ×1
  • PolylineCollection.PolylineBucket.writeForMorph (cognitive 33) packages/engine/Source/Scene/PolylineCollection.js:1542 — PolylineCollection.PolylineBucket.writeForMorph has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (6 pts), ternaries 2 (6 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 · Vector3DTileContent.getBatchIds (cognitive 33) · ×1
  • Vector3DTileContent.getBatchIds (cognitive 33) packages/engine/Source/Scene/Vector3DTileContent.js:262 — Vector3DTileContent.getBatchIds has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (11 pts), loops 3 (9 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 · InvertClassification.InvertClassification.update (cognitive 33) · ×1
  • InvertClassification.InvertClassification.update (cognitive 33) packages/engine/Source/Scene/InvertClassification.js:177 — InvertClassification.InvertClassification.update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 9, ternaries 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 · decodeI3S.generateGltfBuffer (cognitive 33) · ×1
  • decodeI3S.generateGltfBuffer (cognitive 33) packages/engine/Source/Workers/decodeI3S.js:628 — decodeI3S.generateGltfBuffer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (20 pts), ternaries 6, loops 3 (5 pts), boolean chains 2 (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 · decodeI3S.decodeDracoEncodedGeometry (cognitive 33) · ×1
  • decodeI3S.decodeDracoEncodedGeometry (cognitive 33) packages/engine/Source/Workers/decodeI3S.js:1076 — decodeI3S.decodeDracoEncodedGeometry has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3 (8 pts), boolean chains 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 · processLineStringOrLinearRing (cognitive 33) · ×1
  • processLineStringOrLinearRing (cognitive 33) packages/engine/Source/DataSources/KmlDataSource.js:1573 — processLineStringOrLinearRing has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (11 pts), boolean chains 4, other 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 · parse (cognitive 33) · ×1
  • parse (cognitive 33) packages/engine/Source/Scene/GltfLoader.js:3183 — parse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (6 pts), ternaries 2 (4 pts), boolean chains 1, other 1 (nesting depth added 17). 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 · packCreateGeometryResults (cognitive 33) · ×1
  • packCreateGeometryResults (cognitive 33) packages/engine/Source/Scene/PrimitivePipeline.js:453 — packCreateGeometryResults has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 5 (11 pts), loops 3 (5 pts), boolean chains 1, other 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 · WebMapServiceImageryProvider (cognitive 33) · ×1
  • WebMapServiceImageryProvider (cognitive 33) packages/engine/Source/Scene/WebMapServiceImageryProvider.js:110 — WebMapServiceImageryProvider has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, other 6, ternaries 2 (4 pts) (nesting depth added 6). Of this number, 31 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CorridorGeometryLibrary.CorridorGeometryLibrary.computePositions (cognitive 32) · ×1
  • CorridorGeometryLibrary.CorridorGeometryLibrary.computePositions (cognitive 32) packages/core/Source/CorridorGeometryLibrary.js:210 — CorridorGeometryLibrary.CorridorGeometryLibrary.computePositions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 2, ternaries 2, 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 · CorridorOutlineGeometry.combine (cognitive 32) · ×1
  • CorridorOutlineGeometry.combine (cognitive 32) packages/core/Source/CorridorOutlineGeometry.js:31 — CorridorOutlineGeometry.combine has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 9 (16 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 · ArcGISTiledElevationTerrainProvider.findRange (cognitive 32) · ×1
  • ArcGISTiledElevationTerrainProvider.findRange (cognitive 32) REDACTED:547 — ArcGISTiledElevationTerrainProvider.findRange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (7 pts), ternaries 1 (2 pts), boolean chains 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 · Cesium3DTileFeature.getPropertyInherited (cognitive 32) · ×1
  • Cesium3DTileFeature.getPropertyInherited (cognitive 32) packages/engine/Source/Scene/Cesium3DTileFeature.js:244 — Cesium3DTileFeature.getPropertyInherited has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 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 · ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline (cognitive 32) · ×1
  • ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline (cognitive 32) packages/engine/Source/Scene/Model/ModelRuntimePrimitive.js:194 — ModelRuntimePrimitive.ModelRuntimePrimitive.configurePipeline has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14 (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 · PolylineCollection.createVertexArrays (cognitive 32) · ×1
  • PolylineCollection.createVertexArrays (cognitive 32) packages/engine/Source/Scene/PolylineCollection.js:843 — PolylineCollection.createVertexArrays has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 18). 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 · Cesium3DTile.applyDebugSettings (cognitive 32) · ×1
  • Cesium3DTile.applyDebugSettings (cognitive 32) packages/engine/Source/Scene/Cesium3DTile.js:2157 — Cesium3DTile.applyDebugSettings has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 11 (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 · GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch (cognitive 32) · ×1
  • GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch (cognitive 32) packages/engine/Source/DataSources/GeometryVisualizer.js:431 — GeometryVisualizer.GeometryVisualizer._insertUpdaterIntoBatch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 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 · AnimationViewModel.AnimationViewModel (cognitive 32) · ×1
  • AnimationViewModel.AnimationViewModel (cognitive 32) packages/widgets/Source/Animation/AnimationViewModel.js:104 — AnimationViewModel.AnimationViewModel has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 12 (nesting depth added 1). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 238, 198, 168, …). 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 · update (cognitive 32) · ×1
  • update (cognitive 32) packages/engine/Source/DataSources/KmlDataSource.js:3845 — update has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, error handling 1 (3 pts), loops 1, other 1 (nesting depth added 12). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch ((anonymous), recurseIgnoreEntities, (anonymous)::(anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Label (cognitive 32) · ×1
  • Label (cognitive 32) packages/engine/Source/Scene/Label.js:141 — Label has cognitive complexity 32 (threshold 15). Drivers by points: other 18, if/else 9 (13 pts), boolean chains 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 · GeometryPipeline.GeometryPipeline.reorderForPreVertexCache (cognitive 31) · ×1
  • GeometryPipeline.GeometryPipeline.reorderForPreVertexCache (cognitive 31) packages/core/Source/GeometryPipeline.js:315 — GeometryPipeline.GeometryPipeline.reorderForPreVertexCache has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 6 (14 pts), boolean chains 1 (nesting depth added 19). 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 · PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions (cognitive 31) · ×1
  • PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions (cognitive 31) packages/core/Source/PolylineVolumeGeometryLibrary.js:371 — PolylineVolumeGeometryLibrary.PolylineVolumeGeometryLibrary.computePositions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 5 (6 pts), boolean chains 2, 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 · TimeIntervalCollection.TimeIntervalCollection.removeInterval (cognitive 31) · ×1
  • TimeIntervalCollection.TimeIntervalCollection.removeInterval (cognitive 31) packages/core/Source/TimeIntervalCollection.js:510 — TimeIntervalCollection.TimeIntervalCollection.removeInterval has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 13, 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 · TileAvailability.findMaxLevelFromNode (cognitive 31) · ×1
  • TileAvailability.findMaxLevelFromNode (cognitive 31) packages/engine/Source/Core/TileAvailability.js:390 — TileAvailability.findMaxLevelFromNode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, loops 3 (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 · CesiumTerrainProvider.createQuantizedMeshTerrainData (cognitive 31) · ×1
  • CesiumTerrainProvider.createQuantizedMeshTerrainData (cognitive 31) packages/engine/Source/Core/CesiumTerrainProvider.js:598 — CesiumTerrainProvider.createQuantizedMeshTerrainData has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (13 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Vector3DTileContent.initialize (cognitive 31) · ×1
  • Vector3DTileContent.initialize (cognitive 31) packages/engine/Source/Scene/Vector3DTileContent.js:363 — Vector3DTileContent.initialize has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 1 (3 pts), boolean chains 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 · CreditDisplay.displayCredits (cognitive 31) · ×1
  • CreditDisplay.displayCredits (cognitive 31) packages/engine/Source/Scene/CreditDisplay.js:76 — CreditDisplay.displayCredits has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 2 (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 · ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader (cognitive 31) · ×1
  • ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader (cognitive 31) packages/engine/Source/Scene/ShadowMapShader.js:215 — ShadowMapShader.ShadowMapShader.createShadowReceiveFragmentShader has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 7, ternaries 2 (3 pts), loops 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, 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 · ScreenSpaceCameraController.spin3D (cognitive 31) · ×1
  • ScreenSpaceCameraController.spin3D (cognitive 31) packages/engine/Source/Scene/ScreenSpaceCameraController.js:1908 — ScreenSpaceCameraController.spin3D has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 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 · VoxelRenderResources.VoxelRenderResources (cognitive 31) · ×1
  • VoxelRenderResources.VoxelRenderResources (cognitive 31) packages/engine/Source/Scene/VoxelRenderResources.js:31 — VoxelRenderResources.VoxelRenderResources has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 2, loops 2, ternaries 1 (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 · GlobeSurfaceTileProvider.canRenderWithoutLosingDetail (cognitive 31) · ×1
  • GlobeSurfaceTileProvider.canRenderWithoutLosingDetail (cognitive 31) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:936 — GlobeSurfaceTileProvider.canRenderWithoutLosingDetail has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 7, loops 4 (7 pts), ternaries 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 · arrayRemoveDuplicates.arrayRemoveDuplicates (cognitive 30) · ×1
  • arrayRemoveDuplicates.arrayRemoveDuplicates (cognitive 30) packages/core/Source/arrayRemoveDuplicates.js:49 — arrayRemoveDuplicates.arrayRemoveDuplicates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 1, loops 1, ternaries 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 · RectangleGeometry.calculateAttributesWall (cognitive 30) · ×1
  • RectangleGeometry.calculateAttributesWall (cognitive 30) packages/core/Source/RectangleGeometry.js:139 — RectangleGeometry.calculateAttributesWall has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), ternaries 3, boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GroundPrimitive.updateAndQueueCommands (cognitive 30) · ×1
  • GroundPrimitive.updateAndQueueCommands (cognitive 30) packages/engine/Source/Scene/GroundPrimitive.js:546 — GroundPrimitive.updateAndQueueCommands has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cesium3DTilesetBaseTraversal.updateAndPushChildren (cognitive 30) · ×1
  • Cesium3DTilesetBaseTraversal.updateAndPushChildren (cognitive 30) packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js:94 — Cesium3DTilesetBaseTraversal.updateAndPushChildren has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, loops 3 (4 pts), ternaries 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 · CameraEventAggregator.listenMouseMove (cognitive 30) · ×1
  • CameraEventAggregator.listenMouseMove (cognitive 30) packages/engine/Source/Scene/CameraEventAggregator.js:298 — CameraEventAggregator.listenMouseMove has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 2 (nesting depth added 19). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 330). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GlobeSurfaceTileProvider.computeTileVisibility (cognitive 30) · ×1
  • GlobeSurfaceTileProvider.computeTileVisibility (cognitive 30) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:755 — GlobeSurfaceTileProvider.computeTileVisibility has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 6 (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 · I3SGeometry.I3SGeometry.getClosestPointIndexOnTriangle (cognitive 30) · ×1
  • I3SGeometry.I3SGeometry.getClosestPointIndexOnTriangle (cognitive 30) packages/engine/Source/Scene/I3SGeometry.js:137 — I3SGeometry.I3SGeometry.getClosestPointIndexOnTriangle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 3, loops 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 · I3SNode.I3SNode._create3DTileDefinition (cognitive 30) · ×1
  • I3SNode.I3SNode._create3DTileDefinition (cognitive 30) packages/engine/Source/Scene/I3SNode.js:441 — I3SNode.I3SNode._create3DTileDefinition has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createVectorTilePolygons.createVectorTilePolygons (cognitive 30) · ×1
  • createVectorTilePolygons.createVectorTilePolygons (cognitive 30) packages/engine/Source/Workers/createVectorTilePolygons.js:105 — createVectorTilePolygons.createVectorTilePolygons has cognitive complexity 30 (threshold 15). Drivers by points: loops 11 (15 pts), if/else 8 (12 pts), boolean chains 2, ternaries 1 (nesting depth added 8). 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 · Viewer.Viewer.resize (cognitive 30) · ×1
  • Viewer.Viewer.resize (cognitive 30) packages/widgets/Source/Viewer/Viewer.js:1575 — Viewer.Viewer.resize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 6 (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 · update (cognitive 30) · ×1
  • update (cognitive 30) REDACTED:1275 — update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · createInstances (cognitive 30) · ×1
  • createInstances (cognitive 30) packages/engine/Source/Scene/Model/I3dmLoader.js:375 — createInstances has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CubicRealPolynomial.CubicRealPolynomial.computeRealRoots (cognitive 29) · ×1
  • CubicRealPolynomial.CubicRealPolynomial.computeRealRoots (cognitive 29) packages/core/Source/CubicRealPolynomial.js:164 — CubicRealPolynomial.CubicRealPolynomial.computeRealRoots has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 1 (3 pts) (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 · ShadowMap.applyDebugSettings (cognitive 29) · ×1
  • ShadowMap.applyDebugSettings (cognitive 29) packages/engine/Source/Scene/ShadowMap.js:929 — ShadowMap.applyDebugSettings has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 1 (3 pts) (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 · I3SDataProvider.addLayers (cognitive 29) · ×1
  • I3SDataProvider.addLayers (cognitive 29) packages/engine/Source/Scene/I3SDataProvider.js:426 — I3SDataProvider.addLayers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (6 pts), boolean chains 2 (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 · DiffMatcher.contextBasedMatch (cognitive 29) · ×1
  • DiffMatcher.contextBasedMatch (cognitive 29) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:365 — DiffMatcher.contextBasedMatch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 4, 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 · look3D (cognitive 29) · ×1
  • look3D (cognitive 29) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2751 — look3D has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 6, ternaries 2, other 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ShadowMap (cognitive 29) · ×1
  • ShadowMap (cognitive 29) packages/engine/Source/Scene/ShadowMap.js:83 — ShadowMap has cognitive complexity 29 (threshold 15). Drivers by points: other 13, if/else 10, boolean chains 3, ternaries 2, loops 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 · PolygonGeometryLibrary.PolygonGeometryLibrary.polygonOutlinesFromHierarchy (cognitive 28) · ×1
  • PolygonGeometryLibrary.PolygonGeometryLibrary.polygonOutlinesFromHierarchy (cognitive 28) packages/core/Source/PolygonGeometryLibrary.js:425 — PolygonGeometryLibrary.PolygonGeometryLibrary.polygonOutlinesFromHierarchy has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (13 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 · HermitePolynomialApproximation.interpolateOrderZero (cognitive 28) · ×1
  • HermitePolynomialApproximation.interpolateOrderZero (cognitive 28) packages/core/Source/HermitePolynomialApproximation.js:137 — HermitePolynomialApproximation.interpolateOrderZero has cognitive complexity 28 (threshold 15). Drivers by points: loops 10 (18 pts), if/else 4 (9 pts), boolean chains 1 (nesting depth added 13). 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 · VertexArray.interleaveAttributes (cognitive 28) · ×1
  • VertexArray.interleaveAttributes (cognitive 28) packages/engine/Source/Renderer/VertexArray.js:386 — VertexArray.interleaveAttributes has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 6 (12 pts), boolean chains 1 (nesting depth added 14). 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 · ClassificationPrimitive.updateAndQueueCommands (cognitive 28) · ×1
  • ClassificationPrimitive.updateAndQueueCommands (cognitive 28) packages/engine/Source/Scene/ClassificationPrimitive.js:915 — ClassificationPrimitive.updateAndQueueCommands has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (7 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 · pickModel.pickModel (cognitive 28) · ×1
  • pickModel.pickModel (cognitive 28) packages/engine/Source/Scene/Model/pickModel.js:60 — pickModel.pickModel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CompositeEntityCollection.CompositeEntityCollection._onCollectionChanged (cognitive 28) · ×1
  • CompositeEntityCollection.CompositeEntityCollection._onCollectionChanged (cognitive 28) packages/engine/Source/DataSources/CompositeEntityCollection.js:472 — CompositeEntityCollection.CompositeEntityCollection._onCollectionChanged has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (6 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 · GeoJsonDataSource.createPolygon (cognitive 28) · ×1
  • GeoJsonDataSource.createPolygon (cognitive 28) packages/engine/Source/DataSources/GeoJsonDataSource.js:431 — GeoJsonDataSource.createPolygon has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, 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 · TerrainFillMesh.addEdgeMesh (cognitive 28) · ×1
  • TerrainFillMesh.addEdgeMesh (cognitive 28) packages/engine/Source/Scene/TerrainFillMesh.js:1794 — TerrainFillMesh.addEdgeMesh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, ternaries 1 (2 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParticleSystem.ParticleSystem.update (cognitive 28) · ×1
  • ParticleSystem.ParticleSystem.update (cognitive 28) packages/engine/Source/Scene/ParticleSystem.js:706 — ParticleSystem.ParticleSystem.update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · coreMigrationShared.getEngineDependentRootSpecHelpers (cognitive 28) · ×1
  • coreMigrationShared.getEngineDependentRootSpecHelpers (cognitive 28) scripts/coreMigrationShared.js:156 — coreMigrationShared.getEngineDependentRootSpecHelpers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _onLayerAdded (cognitive 28) · ×1
  • _onLayerAdded (cognitive 28) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1236 — _onLayerAdded has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, loops 1 (2 pts), other 1 (nesting depth added 13). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (reloadFunction::(anonymous), (anonymous), reloadFunction). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · setShuttleRingFromMouseOrTouch (cognitive 28) · ×1
  • setShuttleRingFromMouseOrTouch (cognitive 28) packages/widgets/Source/Animation/Animation.js:214 — setShuttleRingFromMouseOrTouch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 12 (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 · WebMapTileServiceImageryProvider (cognitive 28) · ×1
  • WebMapTileServiceImageryProvider (cognitive 28) packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js:181 — WebMapTileServiceImageryProvider has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), other 6, boolean chains 4 (nesting depth added 3). Of this number, 26 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · constructor (cognitive 28) · ×1
  • constructor (cognitive 28) packages/engine/Source/Scene/GeoJsonPrimitive.js:90 — constructor has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 3 (9 pts), loops 4 (7 pts), if/else 5 (6 pts), other 5, boolean chains 1 (nesting depth added 10). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createGeometry (cognitive 28) · ×1
  • createGeometry (cognitive 28) packages/core/Source/PolygonOutlineGeometry.js:566 — createGeometry has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (9 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 16). 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 · PolylineVolumeGeometry.computeAttributes (cognitive 27) · ×1
  • PolylineVolumeGeometry.computeAttributes (cognitive 27) packages/core/Source/PolylineVolumeGeometry.js:25 — PolylineVolumeGeometry.computeAttributes has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 7 (10 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). 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 · ImageryLayerCollection.pickModelFeatures (cognitive 27) · ×1
  • ImageryLayerCollection.pickModelFeatures (cognitive 27) packages/engine/Source/Scene/ImageryLayerCollection.js:544 — ImageryLayerCollection.pickModelFeatures has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeoJsonDataSource.load (cognitive 27) · ×1
  • GeoJsonDataSource.load (cognitive 27) packages/engine/Source/DataSources/GeoJsonDataSource.js:986 — GeoJsonDataSource.load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 1, ternaries 1 (nesting depth added 10). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimeDynamicPointCloud.TimeDynamicPointCloud.update (cognitive 27) · ×1
  • TimeDynamicPointCloud.TimeDynamicPointCloud.update (cognitive 27) packages/engine/Source/Scene/TimeDynamicPointCloud.js:614 — TimeDynamicPointCloud.TimeDynamicPointCloud.update has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 7 (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 · createVectorTilePolylines.createVectorTilePolylines (cognitive 27) · ×1
  • createVectorTilePolylines.createVectorTilePolylines (cognitive 27) packages/engine/Source/Workers/createVectorTilePolylines.js:53 — createVectorTilePolylines.createVectorTilePolylines has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (9 pts), loops 4 (7 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 · destroy (cognitive 27) · ×1
  • destroy (cognitive 27) packages/engine/Source/Scene/Scene.js:5513 — destroy has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 23, if/else 3, loops 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 · load (cognitive 27) · ×1
  • load (cognitive 27) packages/engine/Source/DataSources/KmlDataSource.js:3353 — load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), loops 1 (3 pts), other 3, ternaries 1 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 13 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 3398, 3386, 3388, …). 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 · _updateCameraChanged (cognitive 27) · ×1
  • _updateCameraChanged (cognitive 27) packages/engine/Source/Scene/Camera.js:376 — _updateCameraChanged has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · adjustHeightForTerrain (cognitive 27) · ×1
  • adjustHeightForTerrain (cognitive 27) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2911 — adjustHeightForTerrain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 4, other 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 · fromVertices (cognitive 27) · ×1
  • fromVertices (cognitive 27) packages/core/Source/BoundingSphere.js:359 — fromVertices has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2, other 2, 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 · pickPositionWorldCoordinates (cognitive 27) · ×1
  • pickPositionWorldCoordinates (cognitive 27) packages/engine/Source/Scene/Picking.js:693 — pickPositionWorldCoordinates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 1 (4 pts), boolean chains 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 · process (cognitive 27) · ×1
  • process (cognitive 27) packages/engine/Source/Scene/Model/MaterialPipelineStage.js:60 — process has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 8 (nesting depth added 4). Of this number, 24 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Clock.Clock.tick (cognitive 26) · ×1
  • Clock.Clock.tick (cognitive 26) packages/core/Source/Clock.js:258 — Clock.Clock.tick has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (4 pts), boolean chains 1 (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 · Resource.Resource._Implementations.loadWithXhr (cognitive 26) · ×1
  • Resource.Resource._Implementations.loadWithXhr (cognitive 26) packages/engine/Source/Core/Resource.js:2099 — Resource.Resource._Implementations.loadWithXhr has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (10 pts), loops 1 (2 pts) (nesting depth added 3). 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 · ShaderProgram.createAndLinkProgram (cognitive 26) · ×1
  • ShaderProgram.createAndLinkProgram (cognitive 26) packages/engine/Source/Renderer/ShaderProgram.js:186 — ShaderProgram.createAndLinkProgram has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, 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 · VectorPipeline.packPolygonGrid (cognitive 26) · ×1
  • VectorPipeline.packPolygonGrid (cognitive 26) packages/engine/Source/Core/VectorPipeline.js:554 — VectorPipeline.packPolygonGrid has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 2 (9 pts) (nesting depth added 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 · Material.createMethodDefinition (cognitive 26) · ×1
  • Material.createMethodDefinition (cognitive 26) packages/engine/Source/Scene/Material.js:857 — Material.createMethodDefinition has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). 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 · PrimitivePipeline.PrimitivePipeline.combineGeometry (cognitive 26) · ×1
  • PrimitivePipeline.PrimitivePipeline.combineGeometry (cognitive 26) packages/engine/Source/Scene/PrimitivePipeline.js:317 — PrimitivePipeline.PrimitivePipeline.combineGeometry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, 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 · GeometryUpdater.GeometryUpdater._onEntityPropertyChanged (cognitive 26) · ×1
  • GeometryUpdater.GeometryUpdater._onEntityPropertyChanged (cognitive 26) packages/engine/Source/DataSources/GeometryUpdater.js:411 — GeometryUpdater.GeometryUpdater._onEntityPropertyChanged has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, ternaries 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 · ArcGisMapServerImageryProvider.metadataSuccess (cognitive 26) · ×1
  • ArcGisMapServerImageryProvider.metadataSuccess (cognitive 26) packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js:132 — ArcGisMapServerImageryProvider.metadataSuccess has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4 (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 · PolylineCollection.PolylineBucket.updateIndices (cognitive 26) · ×1
  • PolylineCollection.PolylineBucket.updateIndices (cognitive 26) packages/engine/Source/Scene/PolylineCollection.js:1644 — PolylineCollection.PolylineBucket.updateIndices has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (8 pts) (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 · GaussianSplatPrimitive.processGeneratedSplatTextureData (cognitive 26) · ×1
  • GaussianSplatPrimitive.processGeneratedSplatTextureData (cognitive 26) packages/engine/Source/Scene/GaussianSplatPrimitive.js:477 — GaussianSplatPrimitive.processGeneratedSplatTextureData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 1 (3 pts), boolean chains 2, error handling 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 · ScreenSpaceInputBindings.registerDragInputBindings (cognitive 26) · ×1
  • ScreenSpaceInputBindings.registerDragInputBindings (cognitive 26) packages/engine/Source/Scene/Controllers/ScreenSpaceInputBindings.js:79 — ScreenSpaceInputBindings.registerDragInputBindings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 2, boolean chains 1 (nesting depth added 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 111, 124, 139, …). 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 · Picking.addDrillPickedResults (cognitive 26) · ×1
  • Picking.addDrillPickedResults (cognitive 26) packages/engine/Source/Scene/Picking.js:829 — Picking.addDrillPickedResults has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, loops 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 · I3SField.I3SField._validateBody (cognitive 26) · ×1
  • I3SField.I3SField._validateBody (cognitive 26) packages/engine/Source/Scene/I3SField.js:302 — I3SField.I3SField._validateBody has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (2 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 · createElevationBandMaterial.preprocess (cognitive 26) · ×1
  • createElevationBandMaterial.preprocess (cognitive 26) packages/engine/Source/Scene/createElevationBandMaterial.js:97 — createElevationBandMaterial.preprocess has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 4 (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 · decodeI3S.generateIndexArray (cognitive 26) · ×1
  • decodeI3S.generateIndexArray (cognitive 26) packages/engine/Source/Workers/decodeI3S.js:206 — decodeI3S.generateIndexArray has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (10 pts), boolean chains 3, ternaries 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 · transcodeKTX2.transcodeCompressed (cognitive 26) · ×1
  • transcodeKTX2.transcodeCompressed (cognitive 26) packages/engine/Source/Workers/transcodeKTX2.js:138 — transcodeKTX2.transcodeCompressed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 3, loops 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, 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 · update (cognitive 26) · ×1
  • update (cognitive 26) packages/engine/Source/Scene/Model/Model.js:2001 — update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, error handling 1, other 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 · BoundingSphere.fromPoints (cognitive 25) · ×1
  • BoundingSphere.fromPoints (cognitive 25) packages/core/Source/BoundingSphere.js:61 — BoundingSphere.fromPoints has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2, 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 · BoundingSphere.fromEncodedCartesianVertices (cognitive 25) · ×1
  • BoundingSphere.fromEncodedCartesianVertices (cognitive 25) packages/core/Source/BoundingSphere.js:546 — BoundingSphere.fromEncodedCartesianVertices has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2, 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 · Spline.Spline.findTimeInterval (cognitive 25) · ×1
  • Spline.Spline.findTimeInterval (cognitive 25) packages/core/Source/Spline.js:93 — Spline.Spline.findTimeInterval has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, loops 2 (4 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 · GeometryPipeline.splitLongitudeLines (cognitive 25) · ×1
  • GeometryPipeline.splitLongitudeLines (cognitive 25) packages/core/Source/GeometryPipeline.js:2651 — GeometryPipeline.splitLongitudeLines has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2, ternaries 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 · PolygonOutlineGeometry.createGeometryFromPositionsExtruded (cognitive 25) · ×1
  • PolygonOutlineGeometry.createGeometryFromPositionsExtruded (cognitive 25) packages/core/Source/PolygonOutlineGeometry.js:136 — PolygonOutlineGeometry.createGeometryFromPositionsExtruded has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 7 (10 pts) (nesting depth added 11). 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 · combine.combine (cognitive 25) · ×1
  • combine.combine (cognitive 25) packages/core/Source/combine.js:34 — combine.combine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). 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 · CubeMapFace.CubeMapFace.copyFrom (cognitive 25) · ×1
  • CubeMapFace.CubeMapFace.copyFrom (cognitive 25) packages/engine/Source/Renderer/CubeMapFace.js:85 — CubeMapFace.CubeMapFace.copyFrom has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 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 · CubeMap.CubeMap (cognitive 25) · ×1
  • CubeMap.CubeMap (cognitive 25) packages/engine/Source/Renderer/CubeMap.js:73 — CubeMap.CubeMap has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, loops 2 (3 pts) (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 · PrimitiveOutlineGenerator.initialize (cognitive 25) · ×1
  • PrimitiveOutlineGenerator.initialize (cognitive 25) packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js:175 — PrimitiveOutlineGenerator.initialize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (7 pts), boolean chains 6 (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 · ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures (cognitive 25) · ×1
  • ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures (cognitive 25) packages/engine/Source/Scene/ImageryLayerCollection.js:635 — ImageryLayerCollection.ImageryLayerCollection.pickImageryLayerFeatures has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). Of this number, 14 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathVisualizer.PathVisualizer._onCollectionChanged (cognitive 25) · ×1
  • PathVisualizer.PathVisualizer._onCollectionChanged (cognitive 25) packages/engine/Source/DataSources/PathVisualizer.js:1390 — PathVisualizer.PathVisualizer._onCollectionChanged has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3, boolean chains 2 (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 · CubeMapPanorama.CubeMapPanorama.update (cognitive 25) · ×1
  • CubeMapPanorama.CubeMapPanorama.update (cognitive 25) packages/engine/Source/Scene/CubeMapPanorama.js:162 — CubeMapPanorama.CubeMapPanorama.update has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createVectorTileClampedPolylines.createVectorTileClampedPolylines (cognitive 25) · ×1
  • createVectorTileClampedPolylines.createVectorTileClampedPolylines (cognitive 25) packages/engine/Source/Workers/createVectorTileClampedPolylines.js:329 — createVectorTileClampedPolylines.createVectorTileClampedPolylines has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (5 pts), ternaries 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 · styleEditorKeyPress (cognitive 25) · ×1
  • styleEditorKeyPress (cognitive 25) packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js:1485 — styleEditorKeyPress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 13). 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 · test (cognitive 25) · ×1
  • test (cognitive 25) REDACTED:833 — test has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 11, boolean chains 2, other 1 (nesting depth added 1). Of this number, 23 points are the body's own statements and 2 belong to 2 function items 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 · shaderEditorKeyPress (cognitive 25) · ×1
  • shaderEditorKeyPress (cognitive 25) packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js:911 — shaderEditorKeyPress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 13). 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 · MetadataTableProperty (cognitive 25) · ×1
  • MetadataTableProperty (cognitive 25) packages/engine/Source/Scene/MetadataTableProperty.js:37 — MetadataTableProperty has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, other 10, boolean chains 2. 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 · GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices (cognitive 24) · ×1
  • GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices (cognitive 24) packages/core/Source/GeometryPipeline.js:495 — GeometryPipeline.GeometryPipeline.fitToUnsignedShortIndices has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (5 pts), boolean chains 2 (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 · PolygonGeometry.createGeometryFromPositionsExtruded (cognitive 24) · ×1
  • PolygonGeometry.createGeometryFromPositionsExtruded (cognitive 24) packages/core/Source/PolygonGeometry.js:428 — PolygonGeometry.createGeometryFromPositionsExtruded has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (7 pts), boolean chains 4 (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 · PolygonOutlineGeometry.createGeometryFromPositions (cognitive 24) · ×1
  • PolygonOutlineGeometry.createGeometryFromPositions (cognitive 24) packages/core/Source/PolygonOutlineGeometry.js:26 — PolygonOutlineGeometry.createGeometryFromPositions has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 7 (10 pts) (nesting depth added 11). 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 · RectangleGeometry.calculateAttributes (cognitive 24) · ×1
  • RectangleGeometry.calculateAttributes (cognitive 24) packages/core/Source/RectangleGeometry.js:72 — RectangleGeometry.calculateAttributes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 3, boolean chains 2, loops 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 · CartographicGeocoderService.CartographicGeocoderService.geocode (cognitive 24) · ×1
  • CartographicGeocoderService.CartographicGeocoderService.geocode (cognitive 24) packages/engine/Source/Core/CartographicGeocoderService.js:33 — CartographicGeocoderService.CartographicGeocoderService.geocode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). 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 · GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry (cognitive 24) · ×1
  • GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry (cognitive 24) packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js:303 — GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.requestTileGeometry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PntsParser.PntsParser.parse (cognitive 24) · ×1
  • PntsParser.PntsParser.parse (cognitive 24) packages/engine/Source/Scene/PntsParser.js:35 — PntsParser.PntsParser.parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6 (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 · SampledProperty.mergeNewSamples (cognitive 24) · ×1
  • SampledProperty.mergeNewSamples (cognitive 24) packages/engine/Source/DataSources/SampledProperty.js:58 — SampledProperty.mergeNewSamples has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (10 pts), boolean chains 3 (nesting depth added 13). 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 · GlobeTranslucencyState.getDerivedCommandTypes (cognitive 24) · ×1
  • GlobeTranslucencyState.getDerivedCommandTypes (cognitive 24) packages/engine/Source/Scene/GlobeTranslucencyState.js:292 — GlobeTranslucencyState.getDerivedCommandTypes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 4 (6 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 · QuadtreePrimitive.selectTilesForRendering (cognitive 24) · ×1
  • QuadtreePrimitive.selectTilesForRendering (cognitive 24) packages/engine/Source/Scene/QuadtreePrimitive.js:507 — QuadtreePrimitive.selectTilesForRendering has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (5 pts), ternaries 1 (nesting depth added 11). Of this number, 22 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 · I3SField.I3SField._parseBody (cognitive 24) · ×1
  • I3SField.I3SField._parseBody (cognitive 24) packages/engine/Source/Scene/I3SField.js:218 — I3SField.I3SField._parseBody has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decodeGoogleEarthEnterprisePacket.processMetadata (cognitive 24) · ×1
  • decodeGoogleEarthEnterprisePacket.processMetadata (cognitive 24) packages/engine/Source/Workers/decodeGoogleEarthEnterprisePacket.js:52 — decodeGoogleEarthEnterprisePacket.processMetadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 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 · decodeI3S.addOutlinesForEdge (cognitive 24) · ×1
  • decodeI3S.addOutlinesForEdge (cognitive 24) packages/engine/Source/Workers/decodeI3S.js:442 — decodeI3S.addOutlinesForEdge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 2 (8 pts), loops 2 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · processNetworkLinkQueryString (cognitive 24) · ×1
  • processNetworkLinkQueryString (cognitive 24) packages/engine/Source/DataSources/KmlDataSource.js:2818 — processNetworkLinkQueryString has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 2, other 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createCommands (cognitive 24) · ×1
  • createCommands (cognitive 24) packages/engine/Source/Scene/Primitive.js:1846 — createCommands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 3, 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 · addSkirtsToMesh (cognitive 24) · ×1
  • addSkirtsToMesh (cognitive 24) packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js:1111 — addSkirtsToMesh has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (9 pts), loops 3 (5 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 · equals (cognitive 24) · ×1
  • equals (cognitive 24) packages/engine/Source/Scene/Label.js:1389 — equals has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 24. 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 · intersect (cognitive 24) · ×1
  • intersect (cognitive 24) packages/core/Source/TimeIntervalCollection.js:671 — intersect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, 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 · executeTranslucentCommandsSortedMultipass (cognitive 24) · ×1
  • executeTranslucentCommandsSortedMultipass (cognitive 24) packages/engine/Source/Scene/OIT.js:711 — executeTranslucentCommandsSortedMultipass has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 4, if/else 2, loops 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 · EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions (cognitive 23) · ×1
  • EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions (cognitive 23) packages/core/Source/EllipseGeometryLibrary.js:113 — EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (8 pts), ternaries 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 · HermitePolynomialApproximation.calculateCoefficientTerm (cognitive 23) · ×1
  • HermitePolynomialApproximation.calculateCoefficientTerm (cognitive 23) packages/core/Source/HermitePolynomialApproximation.js:20 — HermitePolynomialApproximation.calculateCoefficientTerm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), boolean chains 2 (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 · TimeIntervalCollection.parseDuration (cognitive 23) · ×1
  • TimeIntervalCollection.parseDuration (cognitive 23) packages/core/Source/TimeIntervalCollection.js:906 — TimeIntervalCollection.parseDuration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoubleEndedPriorityQueue.pushDown (cognitive 23) · ×1
  • DoubleEndedPriorityQueue.pushDown (cognitive 23) packages/engine/Source/Core/DoubleEndedPriorityQueue.js:354 — DoubleEndedPriorityQueue.pushDown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (4 pts), boolean chains 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 · FrustumGeometry.FrustumGeometry.createGeometry (cognitive 23) · ×1
  • FrustumGeometry.FrustumGeometry.createGeometry (cognitive 23) packages/engine/Source/Core/FrustumGeometry.js:385 — FrustumGeometry.FrustumGeometry.createGeometry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (9 pts), boolean chains 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 · ImageBasedLighting.ImageBasedLighting.update (cognitive 23) · ×1
  • ImageBasedLighting.ImageBasedLighting.update (cognitive 23) packages/engine/Source/Scene/ImageBasedLighting.js:330 — ImageBasedLighting.ImageBasedLighting.update has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, if/else 6 (7 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 · TextureAtlas.TextureAtlas._resize (cognitive 23) · ×1
  • TextureAtlas.TextureAtlas._resize (cognitive 23) packages/engine/Source/Renderer/TextureAtlas.js:336 — TextureAtlas.TextureAtlas._resize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 10). 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 · CameraFlightPath.CameraFlightPath.createTween (cognitive 23) · ×1
  • CameraFlightPath.CameraFlightPath.createTween (cognitive 23) packages/engine/Source/Scene/CameraFlightPath.js:408 — CameraFlightPath.CameraFlightPath.createTween has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 21 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 · CloudCollection.updateClouds (cognitive 23) · ×1
  • CloudCollection.updateClouds (cognitive 23) packages/engine/Source/Scene/CloudCollection.js:793 — CloudCollection.updateClouds has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (10 pts), boolean chains 3 (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 · PostProcessStageTextureCache.getCompositeDependencies (cognitive 23) · ×1
  • PostProcessStageTextureCache.getCompositeDependencies (cognitive 23) packages/engine/Source/Scene/PostProcessStageTextureCache.js:72 — PostProcessStageTextureCache.getCompositeDependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (8 pts), boolean chains 4 (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 · processVoxelProperties.processVoxelProperties (cognitive 23) · ×1
  • processVoxelProperties.processVoxelProperties (cognitive 23) packages/engine/Source/Scene/processVoxelProperties.js:15 — processVoxelProperties.processVoxelProperties has cognitive complexity 23 (threshold 15). Drivers by points: loops 12 (15 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 6). 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 · main.document.addEventListener("keydown") (cognitive 23) · ×1
  • main.document.addEventListener("keydown") (cognitive 23) packages/sandcastle/gallery/localtofixedframe/main.js:127 — main.document.addEventListener("keydown") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 1 (nesting depth added 12). 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 · main.applySelection (cognitive 23) · ×1
  • main.applySelection (cognitive 23) packages/sandcastle/gallery/time-dependent-path-graphics/main.js:480 — main.applySelection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (23 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 · loadMaterial (cognitive 23) · ×1
  • loadMaterial (cognitive 23) packages/engine/Source/Scene/GltfLoader.js:1891 — loadMaterial has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, other 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 · getEvaluateTernaryComponentwise (cognitive 23) · ×1
  • getEvaluateTernaryComponentwise (cognitive 23) REDACTED:414 — getEvaluateTernaryComponentwise has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (10 pts) (nesting depth added 1). Most of this is not in the body itself: 0 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 415). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · updateZoomTarget (cognitive 23) · ×1
  • updateZoomTarget (cognitive 23) packages/engine/Source/Widget/CesiumWidget.js:1443 — updateZoomTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2, loops 1, other 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · update (cognitive 23) · ×1
  • update (cognitive 23) packages/engine/Source/Scene/VoxelCylinderShape.js:219 — update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, other 2, loops 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 · merge (cognitive 23) · ×1
  • merge (cognitive 23) packages/engine/Source/DataSources/Entity.js:612 — merge has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, other 2, loops 1, ternaries 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 · CubicRealPolynomial.computeRealRoots (cognitive 22) · ×1
  • CubicRealPolynomial.computeRealRoots (cognitive 22) packages/core/Source/CubicRealPolynomial.js:49 — CubicRealPolynomial.computeRealRoots has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 5 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeometryPipeline.GeometryPipeline.computeNormal (cognitive 22) · ×1
  • GeometryPipeline.GeometryPipeline.computeNormal (cognitive 22) packages/core/Source/GeometryPipeline.js:1162 — GeometryPipeline.GeometryPipeline.computeNormal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 6 (8 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 · Cesium3DTileBatchTable.getBinaryProperties (cognitive 22) · ×1
  • Cesium3DTileBatchTable.getBinaryProperties (cognitive 22) REDACTED:159 — Cesium3DTileBatchTable.getBinaryProperties has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (21 pts), 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 · Label.Label.getScreenSpaceBoundingBox (cognitive 22) · ×1
  • Label.Label.getScreenSpaceBoundingBox (cognitive 22) packages/engine/Source/Scene/Label.js:1282 — Label.Label.getScreenSpaceBoundingBox has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cesium3DTileset.updateTiles (cognitive 22) · ×1
  • Cesium3DTileset.updateTiles (cognitive 22) packages/engine/Source/Scene/Cesium3DTileset.js:3199 — Cesium3DTileset.updateTiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 4 (6 pts), boolean chains 4 (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 · Cesium3DTilesetVisualizer.Cesium3DTilesetVisualizer.update (cognitive 22) · ×1
  • Cesium3DTilesetVisualizer.Cesium3DTilesetVisualizer.update (cognitive 22) packages/engine/Source/DataSources/Cesium3DTilesetVisualizer.js:54 — Cesium3DTilesetVisualizer.Cesium3DTilesetVisualizer.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, ternaries 1 (2 pts), 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 · CzmlDataSource.processProperties (cognitive 22) · ×1
  • CzmlDataSource.processProperties (cognitive 22) packages/engine/Source/DataSources/CzmlDataSource.js:1666 — CzmlDataSource.processProperties has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (7 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 · PolylineGeometryUpdater.DynamicGeometryUpdater.update (cognitive 22) · ×1
  • PolylineGeometryUpdater.DynamicGeometryUpdater.update (cognitive 22) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:677 — PolylineGeometryUpdater.DynamicGeometryUpdater.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5 (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 · CesiumInspectorViewModel.frustumStatisticsToString (cognitive 22) · ×1
  • CesiumInspectorViewModel.frustumStatisticsToString (cognitive 22) packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js:19 — CesiumInspectorViewModel.frustumStatisticsToString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (7 pts) (nesting depth added 15). 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 · generateNormals (cognitive 22) · ×1
  • generateNormals (cognitive 22) packages/engine/Source/Workers/decodeI3S.js:553 — generateNormals has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (6 pts), loops 3 (4 pts), boolean chains 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 · copyFrom (cognitive 22) · ×1
  • copyFrom (cognitive 22) packages/engine/Source/Renderer/Texture.js:862 — copyFrom has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4 (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 · updateRadianceMap (cognitive 22) · ×1
  • updateRadianceMap (cognitive 22) packages/engine/Source/Scene/DynamicEnvironmentMapManager.js:490 — updateRadianceMap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). Of this number, 15 points are the body's own statements and 7 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParticleSystem (cognitive 22) · ×1
  • ParticleSystem (cognitive 22) packages/engine/Source/Scene/ParticleSystem.js:60 — ParticleSystem has cognitive complexity 22 (threshold 15). Drivers by points: other 21, if/else 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 · VoxelInspectorViewModel (cognitive 22) · ×1
  • VoxelInspectorViewModel (cognitive 22) packages/widgets/Source/VoxelInspector/VoxelInspectorViewModel.js:54 — VoxelInspectorViewModel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 0 of the 22 points are its own statements and the rest belongs to 78 function items inside it that branch (addProperty::set, addProperty, setPrimitiveFunction, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · update (cognitive 22) · ×1
  • update (cognitive 22) packages/engine/Source/Scene/OIT.js:238 — update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5 (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 · QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots (cognitive 21) · ×1
  • QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots (cognitive 21) packages/core/Source/QuadraticRealPolynomial.js:56 — QuadraticRealPolynomial.QuadraticRealPolynomial.computeRealRoots has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 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 · GeometryPipeline.updateAdjacencyAfterSplit (cognitive 21) · ×1
  • GeometryPipeline.updateAdjacencyAfterSplit (cognitive 21) packages/core/Source/GeometryPipeline.js:2879 — GeometryPipeline.updateAdjacencyAfterSplit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, 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 · PixelFormat.PixelFormat.toInternalFormat (cognitive 21) · ×1
  • PixelFormat.PixelFormat.toInternalFormat (cognitive 21) packages/core/Source/PixelFormat.js:520 — PixelFormat.PixelFormat.toInternalFormat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 5 (10 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 · GltfDracoLoader.process (cognitive 21) · ×1
  • GltfDracoLoader.process (cognitive 21) packages/engine/Source/Scene/GltfDracoLoader.js:108 — GltfDracoLoader.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), 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 · CesiumTerrainProvider.requestTileGeometry (cognitive 21) · ×1
  • CesiumTerrainProvider.requestTileGeometry (cognitive 21) packages/engine/Source/Core/CesiumTerrainProvider.js:914 — CesiumTerrainProvider.requestTileGeometry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 19 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 · ShaderSource.combineShader (cognitive 21) · ×1
  • ShaderSource.combineShader (cognitive 21) packages/engine/Source/Renderer/ShaderSource.js:153 — ShaderSource.combineShader has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 3 (5 pts), boolean chains 2 (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 · Material.createUniform (cognitive 21) · ×1
  • Material.createUniform (cognitive 21) packages/engine/Source/Scene/Material.js:1163 — Material.createUniform has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 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 · Expression.createRuntimeAst (cognitive 21) · ×1
  • Expression.createRuntimeAst (cognitive 21) REDACTED:896 — Expression.createRuntimeAst has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (19 pts), loops 1 (2 pts) (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 · SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates (cognitive 21) · ×1
  • SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates (cognitive 21) packages/engine/Source/Scene/SceneTransforms.js:101 — SceneTransforms.SceneTransforms.worldWithEyeOffsetToWindowCoordinates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (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 · Cesium3DTilesetSkipTraversal.executeTraversal (cognitive 21) · ×1
  • Cesium3DTilesetSkipTraversal.executeTraversal (cognitive 21) packages/engine/Source/Scene/Cesium3DTilesetSkipTraversal.js:266 — Cesium3DTilesetSkipTraversal.executeTraversal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1, ternaries 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 · VoxelTraversal.generateOctree (cognitive 21) · ×1
  • VoxelTraversal.generateOctree (cognitive 21) packages/engine/Source/Scene/VoxelTraversal.js:978 — VoxelTraversal.generateOctree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · I3SSymbology.buildClassBreaksHash (cognitive 21) · ×1
  • I3SSymbology.buildClassBreaksHash (cognitive 21) packages/engine/Source/Scene/I3SSymbology.js:162 — I3SSymbology.buildClassBreaksHash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 2, loops 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 · ConsoleWrapper.setupWindowErrorHandler (cognitive 21) · ×1
  • ConsoleWrapper.setupWindowErrorHandler (cognitive 21) packages/sandcastle/src/util/ConsoleWrapper.ts:219 — ConsoleWrapper.setupWindowErrorHandler has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 0 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 220, 263). 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 · DiffMatcher.findClosestMatch (cognitive 21) · ×1
  • DiffMatcher.findClosestMatch (cognitive 21) packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts:612 — DiffMatcher.findClosestMatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 3 (4 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 · processDocument (cognitive 21) · ×1
  • processDocument (cognitive 21) packages/engine/Source/DataSources/CzmlDataSource.js:2628 — processDocument has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), other 5 (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 · zoomToOrFly (cognitive 21) · ×1
  • zoomToOrFly (cognitive 21) packages/engine/Source/Widget/CesiumWidget.js:1314 — zoomToOrFly has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, other 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 8 function items inside it that branch ((anonymous), (anonymous)::(anonymous), (anonymous)::(anonymous), …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · GroundPrimitive (cognitive 21) · ×1
  • GroundPrimitive (cognitive 21) packages/engine/Source/Scene/GroundPrimitive.js:116 — GroundPrimitive has cognitive complexity 21 (threshold 15). Drivers by points: other 11, if/else 2 (4 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (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 · load (cognitive 21) · ×1
  • load (cognitive 21) packages/engine/Source/DataSources/GpxDataSource.js:669 — load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (3 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, other 1 (nesting depth added 9). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 690, 688, 727). 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 · equals (cognitive 21) · ×1
  • equals (cognitive 21) packages/engine/Source/DataSources/SampledProperty.js:788 — equals has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (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 · FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator (cognitive 20) · ×1
  • FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator (cognitive 20) packages/core/Source/FixedFrameTransforms.js:118 — FixedFrameTransforms.FixedFrameTransforms.localFrameToFixedFrameGenerator has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 138). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Expression.Node._evaluateTimes (cognitive 20) · ×1
  • Expression.Node._evaluateTimes (cognitive 20) REDACTED:1497 — Expression.Node._evaluateTimes has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. 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 · Expression.Node.getVariables (cognitive 20) · ×1
  • Expression.Node.getVariables (cognitive 20) REDACTED:2169 — Expression.Node.getVariables has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PrimitiveOutlineGenerator.matchAndStoreCoordinates (cognitive 20) · ×1
  • PrimitiveOutlineGenerator.matchAndStoreCoordinates (cognitive 20) packages/engine/Source/Scene/Model/PrimitiveOutlineGenerator.js:305 — PrimitiveOutlineGenerator.matchAndStoreCoordinates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 6, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TileImagery.TileImagery.processStateMachine (cognitive 20) · ×1
  • TileImagery.TileImagery.processStateMachine (cognitive 20) packages/engine/Source/Scene/TileImagery.js:46 — TileImagery.TileImagery.processStateMachine has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, 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 · createVectorTileBuffersFromModelComponents.appendBufferPolygons (cognitive 20) · ×1
  • createVectorTileBuffersFromModelComponents.appendBufferPolygons (cognitive 20) packages/engine/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js:471 — createVectorTileBuffersFromModelComponents.appendBufferPolygons has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 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 · Cesium3DTile.processArrayBuffer (cognitive 20) · ×1
  • Cesium3DTile.processArrayBuffer (cognitive 20) packages/engine/Source/Scene/Cesium3DTile.js:1251 — Cesium3DTile.processArrayBuffer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, error handling 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 · KmlDataSource.loadKmz (cognitive 20) · ×1
  • KmlDataSource.loadKmz (cognitive 20) packages/engine/Source/DataSources/KmlDataSource.js:3289 — KmlDataSource.loadKmz has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). 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 · PromptInput.PromptInput (cognitive 20) · ×1
  • PromptInput.PromptInput (cognitive 20) packages/sandcastle/src/copilot/PromptInput.tsx:32 — PromptInput.PromptInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 122, 77, 50, …). 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 · updateDerivedCommands (cognitive 20) · ×1
  • updateDerivedCommands (cognitive 20) packages/engine/Source/Scene/Scene.js:1804 — updateDerivedCommands has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 1 (3 pts) (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 · updateForPass (cognitive 20) · ×1
  • updateForPass (cognitive 20) packages/engine/Source/Scene/Cesium3DTileset.js:3612 — updateForPass has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts), other 3 (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 · processBillboardIcon (cognitive 20) · ×1
  • processBillboardIcon (cognitive 20) packages/engine/Source/DataSources/KmlDataSource.js:919 — processBillboardIcon has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, other 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 · loadWithXhr · ×1
  • loadWithXhr::onload (cognitive 20) packages/engine/Source/Core/Resource.js:2159 — loadWithXhr::onload has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 8, error handling 1 (2 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 · Context (cognitive 20) · ×1
  • Context (cognitive 20) packages/engine/Source/Renderer/Context.js:44 — Context has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 6, other 4, boolean chains 1, loops 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, 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 · getRayIntersection (cognitive 20) · ×1
  • getRayIntersection (cognitive 20) packages/engine/Source/Scene/Picking.js:1115 — getRayIntersection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fromRectangle (cognitive 20) · ×1
  • fromRectangle (cognitive 20) packages/core/Source/OrientedBoundingBox.js:342 — fromRectangle has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 5, if/else 5, other 3 (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 · fromJulianDateArray (cognitive 20) · ×1
  • fromJulianDateArray (cognitive 20) packages/core/Source/TimeIntervalCollection.js:744 — fromJulianDateArray has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5, other 4, 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 · getHeight (cognitive 20) · ×1
  • getHeight (cognitive 20) packages/engine/Source/Scene/Globe.js:853 — getHeight has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 2, other 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 · preload (cognitive 20) · ×1
  • preload (cognitive 20) packages/engine/Source/DataSources/GeoJsonDataSource.js:910 — preload has cognitive complexity 20 (threshold 15). Drivers by points: other 10, if/else 4 (5 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 3). 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 · parseMetadataSuccess (cognitive 20) · ×1
  • parseMetadataSuccess (cognitive 20) REDACTED:83 — parseMetadataSuccess has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, other 1, ternaries 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 · EarthOrientationParameters.EarthOrientationParameters.compute (cognitive 19) · ×1
  • EarthOrientationParameters.EarthOrientationParameters.compute (cognitive 19) packages/engine/Source/Core/EarthOrientationParameters.js:165 — EarthOrientationParameters.EarthOrientationParameters.compute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (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 · TexturePacker.TexturePacker._findNode (cognitive 19) · ×1
  • TexturePacker.TexturePacker._findNode (cognitive 19) packages/engine/Source/Core/TexturePacker.js:94 — TexturePacker.TexturePacker._findNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4 (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 · PrimitivePipeline.PrimitivePipeline.unpackCreateGeometryResults (cognitive 19) · ×1
  • PrimitivePipeline.PrimitivePipeline.unpackCreateGeometryResults (cognitive 19) packages/engine/Source/Scene/PrimitivePipeline.js:546 — PrimitivePipeline.PrimitivePipeline.unpackCreateGeometryResults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (9 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 · PropertyBag.PropertyBag.merge (cognitive 19) · ×1
  • PropertyBag.PropertyBag.merge (cognitive 19) packages/engine/Source/DataSources/PropertyBag.js:196 — PropertyBag.PropertyBag.merge has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1, 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 · EdgeVisibilityPipelineStage.collectVertexColors (cognitive 19) · ×1
  • EdgeVisibilityPipelineStage.collectVertexColors (cognitive 19) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:518 — EdgeVisibilityPipelineStage.collectVertexColors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4, loops 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. 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 · ArcGisMapServerImageryProvider.ArcGisMapServerImageryProvider.pickFeatures (cognitive 19) · ×1
  • ArcGisMapServerImageryProvider.ArcGisMapServerImageryProvider.pickFeatures (cognitive 19) packages/engine/Source/Scene/ArcGisMapServerImageryProvider.js:773 — ArcGisMapServerImageryProvider.ArcGisMapServerImageryProvider.pickFeatures has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 823). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TileBoundingS2Cell.TileBoundingS2Cell.distanceToCamera (cognitive 19) · ×1
  • TileBoundingS2Cell.TileBoundingS2Cell.distanceToCamera (cognitive 19) packages/engine/Source/Scene/TileBoundingS2Cell.js:392 — TileBoundingS2Cell.TileBoundingS2Cell.distanceToCamera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 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 · CompositeEntityCollection.CompositeEntityCollection._onDefinitionChanged (cognitive 19) · ×1
  • CompositeEntityCollection.CompositeEntityCollection._onDefinitionChanged (cognitive 19) packages/engine/Source/DataSources/CompositeEntityCollection.js:545 — CompositeEntityCollection.CompositeEntityCollection._onDefinitionChanged has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, loops 1 (nesting depth added 10). 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 · StaticOutlineGeometryBatch.StaticOutlineGeometryBatch.update (cognitive 19) · ×1
  • StaticOutlineGeometryBatch.StaticOutlineGeometryBatch.update (cognitive 19) packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:369 — StaticOutlineGeometryBatch.StaticOutlineGeometryBatch.update has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 2 (6 pts) (nesting depth added 12). 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 · PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance (cognitive 19) · ×1
  • PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance (cognitive 19) packages/engine/Source/DataSources/PolylineGeometryUpdater.js:362 — PolylineGeometryUpdater.PolylineGeometryUpdater.createFillGeometryInstance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (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 · DebugCameraPrimitive.DebugCameraPrimitive.update (cognitive 19) · ×1
  • DebugCameraPrimitive.DebugCameraPrimitive.update (cognitive 19) packages/engine/Source/Scene/DebugCameraPrimitive.js:93 — DebugCameraPrimitive.DebugCameraPrimitive.update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (5 pts), boolean chains 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, 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 · PostProcessStage.createSelectedTexture (cognitive 19) · ×1
  • PostProcessStage.createSelectedTexture (cognitive 19) packages/engine/Source/Scene/PostProcessStage.js:779 — PostProcessStage.createSelectedTexture has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (5 pts), boolean chains 4 (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 · PostProcessStageCollection.PostProcessStageCollection.execute (cognitive 19) · ×1
  • PostProcessStageCollection.PostProcessStageCollection.execute (cognitive 19) packages/engine/Source/Scene/PostProcessStageCollection.js:770 — PostProcessStageCollection.PostProcessStageCollection.execute has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 7, loops 1 (2 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 · SpatialNode.SpatialNode.computeSurroundingRenderableKeyframeNodes (cognitive 19) · ×1
  • SpatialNode.SpatialNode.computeSurroundingRenderableKeyframeNodes (cognitive 19) packages/engine/Source/Scene/SpatialNode.js:178 — SpatialNode.SpatialNode.computeSurroundingRenderableKeyframeNodes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, ternaries 1 (3 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 · VoxelPrimitive.VoxelPrimitive.update (cognitive 19) · ×1
  • VoxelPrimitive.VoxelPrimitive.update (cognitive 19) packages/engine/Source/Scene/VoxelPrimitive.js:1155 — VoxelPrimitive.VoxelPrimitive.update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · Scene.insertShadowCastCommands (cognitive 19) · ×1
  • Scene.insertShadowCastCommands (cognitive 19) packages/engine/Source/Scene/Scene.js:3261 — Scene.insertShadowCastCommands has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), boolean chains 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 · GoogleEarthEnterpriseImageryProvider.decodeEarthImageryPacket (cognitive 19) · ×1
  • GoogleEarthEnterpriseImageryProvider.decodeEarthImageryPacket (cognitive 19) packages/engine/Source/Scene/GoogleEarthEnterpriseImageryProvider.js:483 — GoogleEarthEnterpriseImageryProvider.decodeEarthImageryPacket has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), match/switch 2 (4 pts), boolean chains 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 · decodeMVT.decodeFeature (cognitive 19) · ×1
  • decodeMVT.decodeFeature (cognitive 19) packages/engine/Source/Scene/decodeMVT.js:225 — decodeMVT.decodeFeature has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 5 (7 pts), boolean chains 4 (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 · TimeDynamicPointCloud.unloadFrames (cognitive 19) · ×1
  • TimeDynamicPointCloud.unloadFrames (cognitive 19) packages/engine/Source/Scene/TimeDynamicPointCloud.js:512 — TimeDynamicPointCloud.unloadFrames has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 1, 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 · upsampleQuantizedTerrainMesh.addClippedPolygon (cognitive 19) · ×1
  • upsampleQuantizedTerrainMesh.addClippedPolygon (cognitive 19) packages/engine/Source/Workers/upsampleQuantizedTerrainMesh.js:613 — upsampleQuantizedTerrainMesh.addClippedPolygon has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 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 · Bucket.Bucket (cognitive 19) · ×1
  • Bucket.Bucket (cognitive 19) packages/sandcastle/src/Bucket.tsx:16 — Bucket.Bucket has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 61, 118, 44, …). 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 · toolRegistry.createApplyDiffHandler (cognitive 19) · ×1
  • toolRegistry.createApplyDiffHandler (cognitive 19) packages/sandcastle/src/copilot/ai/tools/toolRegistry.ts:68 — toolRegistry.createApplyDiffHandler has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6 (7 pts), boolean chains 3, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 74). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Timeline.createTouchMoveCallback (cognitive 19) · ×1
  • Timeline.createTouchMoveCallback (cognitive 19) packages/widgets/Source/Timeline/Timeline.js:915 — Timeline.createTouchMoveCallback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 916). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getIconHref (cognitive 19) · ×1
  • getIconHref (cognitive 19) packages/engine/Source/DataSources/KmlDataSource.js:836 — getIconHref has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), other 4, boolean chains 3, ternaries 1 (2 pts) (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 · flyTo (cognitive 19) · ×1
  • flyTo (cognitive 19) packages/engine/Source/Scene/Camera.js:3427 — flyTo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), other 2, boolean chains 1, ternaries 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: 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 · unwrapInterval (cognitive 19) · ×1
  • unwrapInterval (cognitive 19) packages/engine/Source/DataSources/CzmlDataSource.js:524 — unwrapInterval has cognitive complexity 19 (threshold 15). Drivers by points: other 18, match/switch 1. 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 · fetchImage (cognitive 19) · ×1
  • fetchImage (cognitive 19) packages/engine/Source/Core/Resource.js:903 — fetchImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, other 5, error handling 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 7 belong to 4 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 · updateAndQueueCommands (cognitive 19) · ×1
  • updateAndQueueCommands (cognitive 19) packages/engine/Source/Scene/Primitive.js:2001 — updateAndQueueCommands has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), boolean chains 3, 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 · equals (cognitive 19) · ×1
  • equals (cognitive 19) packages/engine/Source/Scene/Billboard.js:1555 — equals has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 19. 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 · continueDraw (cognitive 19) · ×1
  • continueDraw (cognitive 19) packages/engine/Source/Renderer/Context.js:1323 — continueDraw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, other 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 · generateOctree · ×1
  • generateOctree::buildOctree (cognitive 19) packages/engine/Source/Scene/VoxelTraversal.js:996 — generateOctree::buildOctree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Occluder.Occluder.computeVisibility (cognitive 18) · ×1
  • Occluder.Occluder.computeVisibility (cognitive 18) packages/core/Source/Occluder.js:303 — Occluder.Occluder.computeVisibility has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (7 pts) (nesting depth added 10). 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 · BoxGeometry.BoxGeometry.createGeometry (cognitive 18) · ×1
  • BoxGeometry.BoxGeometry.createGeometry (cognitive 18) packages/core/Source/BoxGeometry.js:246 — BoxGeometry.BoxGeometry.createGeometry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · WallGeometryLibrary.removeDuplicates (cognitive 18) · ×1
  • WallGeometryLibrary.removeDuplicates (cognitive 18) packages/core/Source/WallGeometryLibrary.js:22 — WallGeometryLibrary.removeDuplicates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, 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 · Iau2006XysData.Iau2006XysData.computeXysRadians (cognitive 18) · ×1
  • Iau2006XysData.Iau2006XysData.computeXysRadians (cognitive 18) packages/engine/Source/Core/Iau2006XysData.js:147 — Iau2006XysData.Iau2006XysData.computeXysRadians has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (4 pts) (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 · GltfVertexBufferLoader.process (cognitive 18) · ×1
  • GltfVertexBufferLoader.process (cognitive 18) packages/engine/Source/Scene/GltfVertexBufferLoader.js:218 — GltfVertexBufferLoader.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 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 · GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.getTileDataAvailable (cognitive 18) · ×1
  • GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.getTileDataAvailable (cognitive 18) packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js:504 — GoogleEarthEnterpriseTerrainProvider.GoogleEarthEnterpriseTerrainProvider.getTileDataAvailable 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 · VRTheWorldTerrainProvider.getChildMask (cognitive 18) · ×1
  • VRTheWorldTerrainProvider.getChildMask (cognitive 18) packages/engine/Source/Core/VRTheWorldTerrainProvider.js:360 — VRTheWorldTerrainProvider.getChildMask has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 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 · VertexArray.setVertexAttribDivisor (cognitive 18) · ×1
  • VertexArray.setVertexAttribDivisor (cognitive 18) packages/engine/Source/Renderer/VertexArray.js:760 — VertexArray.setVertexAttribDivisor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 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 · RenderState.createFuncs (cognitive 18) · ×1
  • RenderState.createFuncs (cognitive 18) packages/engine/Source/Renderer/RenderState.js:741 — RenderState.createFuncs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 7. 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 · Primitive.recomputeBoundingSpheres (cognitive 18) · ×1
  • Primitive.recomputeBoundingSpheres (cognitive 18) packages/engine/Source/Scene/Primitive.js:1376 — Primitive.recomputeBoundingSpheres has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 7 (8 pts), boolean chains 2 (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 · Geometry3DTileContent.initialize (cognitive 18) · ×1
  • Geometry3DTileContent.initialize (cognitive 18) packages/engine/Source/Scene/Geometry3DTileContent.js:308 — Geometry3DTileContent.initialize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 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 · ClippingPlaneCollection.ClippingPlaneCollection.update (cognitive 18) · ×1
  • ClippingPlaneCollection.ClippingPlaneCollection.update (cognitive 18) packages/engine/Source/Scene/ClippingPlaneCollection.js:469 — ClippingPlaneCollection.ClippingPlaneCollection.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, 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, 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 · GltfGpmLocal.GltfGpmLocal (cognitive 18) · ×1
  • GltfGpmLocal.GltfGpmLocal (cognitive 18) packages/engine/Source/Scene/Model/Extensions/Gpm/GltfGpmLocal.js:50 — GltfGpmLocal.GltfGpmLocal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeoJsonLoader.createLinesPrimitive (cognitive 18) · ×1
  • GeoJsonLoader.createLinesPrimitive (cognitive 18) packages/engine/Source/Scene/Model/GeoJsonLoader.js:253 — GeoJsonLoader.createLinesPrimitive has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (8 pts) (nesting depth added 10). 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 · ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process (cognitive 18) · ×1
  • ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process (cognitive 18) packages/engine/Source/Scene/Model/ImageBasedLightingPipelineStage.js:19 — ImageBasedLightingPipelineStage.ImageBasedLightingPipelineStage.process has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassificationModelDrawCommand.ClassificationModelDrawCommand.pushCommands (cognitive 18) · ×1
  • ClassificationModelDrawCommand.ClassificationModelDrawCommand.pushCommands (cognitive 18) packages/engine/Source/Scene/Model/ClassificationModelDrawCommand.js:481 — ClassificationModelDrawCommand.ClassificationModelDrawCommand.pushCommands has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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 · ModelDrawCommand.ModelDrawCommand.pushCommands (cognitive 18) · ×1
  • ModelDrawCommand.ModelDrawCommand.pushCommands (cognitive 18) packages/engine/Source/Scene/Model/ModelDrawCommand.js:567 — ModelDrawCommand.ModelDrawCommand.pushCommands has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 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 · ModelImagery._imageryConfigurationsModified (cognitive 18) · ×1
  • ModelImagery._imageryConfigurationsModified (cognitive 18) packages/engine/Source/Scene/Model/ModelImagery.js:327 — ModelImagery._imageryConfigurationsModified has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 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 · TextureAtlas.TextureAtlas._processImageQueue (cognitive 18) · ×1
  • TextureAtlas.TextureAtlas._processImageQueue (cognitive 18) packages/engine/Source/Renderer/TextureAtlas.js:541 — TextureAtlas.TextureAtlas._processImageQueue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), error handling 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createVectorTileBuffersFromModelComponents.gatherPrimitiveStats (cognitive 18) · ×1
  • createVectorTileBuffersFromModelComponents.gatherPrimitiveStats (cognitive 18) packages/engine/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js:82 — createVectorTileBuffersFromModelComponents.gatherPrimitiveStats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 1 (4 pts), ternaries 2 (3 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 · Camera.rotateVertical (cognitive 18) · ×1
  • Camera.rotateVertical (cognitive 18) packages/engine/Source/Scene/Camera.js:2083 — Camera.rotateVertical has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7 (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 · FrameRateMonitor.update (cognitive 18) · ×1
  • FrameRateMonitor.update (cognitive 18) packages/engine/Source/Scene/FrameRateMonitor.js:305 — FrameRateMonitor.update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 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 · TranslucentTileClassification.updateResources (cognitive 18) · ×1
  • TranslucentTileClassification.updateResources (cognitive 18) packages/engine/Source/Scene/TranslucentTileClassification.js:134 — TranslucentTileClassification.updateResources has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3 (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 · VoxelTraversal.updateKeyframeNodes (cognitive 18) · ×1
  • VoxelTraversal.updateKeyframeNodes (cognitive 18) packages/engine/Source/Scene/VoxelTraversal.js:559 — VoxelTraversal.updateKeyframeNodes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 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 · GlobeSurfaceTile.processTerrainStateMachine (cognitive 18) · ×1
  • GlobeSurfaceTile.processTerrainStateMachine (cognitive 18) packages/engine/Source/Scene/GlobeSurfaceTile.js:709 — GlobeSurfaceTile.processTerrainStateMachine has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4 (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 · GlobeSurfaceShaderSet.destroy (cognitive 18) · ×1
  • GlobeSurfaceShaderSet.destroy (cognitive 18) packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:497 — GlobeSurfaceShaderSet.destroy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (14 pts), 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 · TerrainFillMesh.getCorner (cognitive 18) · ×1
  • TerrainFillMesh.getCorner (cognitive 18) packages/engine/Source/Scene/TerrainFillMesh.js:1596 — TerrainFillMesh.getCorner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 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 · main.starBurst (cognitive 18) · ×1
  • main.starBurst (cognitive 18) packages/sandcastle/gallery/star-burst/main.js:122 — main.starBurst has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3, 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 · Scene (cognitive 18) · ×1
  • Scene (cognitive 18) packages/engine/Source/Scene/Scene.js:136 — Scene has cognitive complexity 18 (threshold 15). Drivers by points: other 9, if/else 7, boolean chains 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 · processPolygon (cognitive 18) · ×1
  • processPolygon (cognitive 18) packages/engine/Source/DataSources/KmlDataSource.js:1675 — processPolygon has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (5 pts), ternaries 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setView (cognitive 18) · ×1
  • setView (cognitive 18) packages/engine/Source/Scene/Camera.js:1490 — setView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), other 7, boolean chains 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 · PolygonGeometry (cognitive 18) · ×1
  • PolygonGeometry (cognitive 18) packages/core/Source/PolygonGeometry.js:668 — PolygonGeometry has cognitive complexity 18 (threshold 15). Drivers by points: other 11, boolean chains 3, if/else 3, 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 · updateSpecularMaps (cognitive 18) · ×1
  • updateSpecularMaps (cognitive 18) packages/engine/Source/Scene/DynamicEnvironmentMapManager.js:622 — updateSpecularMaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1, other 1 (nesting depth added 8). Of this number, 12 points are the body's own statements and 6 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · upsample (cognitive 18) · ×1
  • upsample (cognitive 18) packages/engine/Source/Core/HeightmapTerrainData.js:494 — upsample has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · localFrameToFixedFrameGenerator · ×1
  • localFrameToFixedFrameGenerator::resultat (cognitive 18) packages/core/Source/FixedFrameTransforms.js:138 — localFrameToFixedFrameGenerator::resultat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, other 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 · processDracoAttributes (cognitive 18) · ×1
  • processDracoAttributes (cognitive 18) packages/engine/Source/Scene/Model/PntsLoader.js:209 — processDracoAttributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (3 pts), 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 · PolylinePipeline.PolylinePipeline.wrapLongitude (cognitive 17) · ×1
  • PolylinePipeline.PolylinePipeline.wrapLongitude (cognitive 17) packages/core/Source/PolylinePipeline.js:207 — PolylinePipeline.PolylinePipeline.wrapLongitude has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). 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 · HermitePolynomialApproximation.fillCoefficientList (cognitive 17) · ×1
  • HermitePolynomialApproximation.fillCoefficientList (cognitive 17) packages/core/Source/HermitePolynomialApproximation.js:316 — HermitePolynomialApproximation.fillCoefficientList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 pts), boolean chains 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 · MetadataClassProperty.parseType (cognitive 17) · ×1
  • MetadataClassProperty.parseType (cognitive 17) packages/engine/Source/Scene/MetadataClassProperty.js:542 — MetadataClassProperty.parseType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 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 · Buffer.Buffer.copyFromBuffer (cognitive 17) · ×1
  • Buffer.Buffer.copyFromBuffer (cognitive 17) packages/engine/Source/Renderer/Buffer.js:298 — Buffer.Buffer.copyFromBuffer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. 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 · CesiumTerrainProvider.checkLayer (cognitive 17) · ×1
  • CesiumTerrainProvider.checkLayer (cognitive 17) packages/engine/Source/Core/CesiumTerrainProvider.js:1344 — CesiumTerrainProvider.checkLayer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1, loops 1 (nesting depth added 10). 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 · VectorPipeline.packPolygonRings (cognitive 17) · ×1
  • VectorPipeline.packPolygonRings (cognitive 17) packages/engine/Source/Core/VectorPipeline.js:472 — VectorPipeline.packPolygonRings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (6 pts), loops 2 (3 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 · sampleTerrainMostDetailed.sampleTerrainMostDetailed (cognitive 17) · ×1
  • sampleTerrainMostDetailed.sampleTerrainMostDetailed (cognitive 17) packages/engine/Source/Core/sampleTerrainMostDetailed.js:35 — sampleTerrainMostDetailed.sampleTerrainMostDetailed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DynamicGeometryUpdater.DynamicGeometryUpdater.update (cognitive 17) · ×1
  • DynamicGeometryUpdater.DynamicGeometryUpdater.update (cognitive 17) packages/engine/Source/DataSources/DynamicGeometryUpdater.js:70 — DynamicGeometryUpdater.DynamicGeometryUpdater.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (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 · GroundPolylinePrimitive.updateAndQueueCommands (cognitive 17) · ×1
  • GroundPolylinePrimitive.updateAndQueueCommands (cognitive 17) packages/engine/Source/Scene/GroundPolylinePrimitive.js:585 — GroundPolylinePrimitive.updateAndQueueCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, 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 · GltfLoader.processLoaders (cognitive 17) · ×1
  • GltfLoader.processLoaders (cognitive 17) packages/engine/Source/Scene/GltfLoader.js:618 — GltfLoader.processLoaders has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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 · EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process (cognitive 17) · ×1
  • EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process (cognitive 17) packages/engine/Source/Scene/Model/EdgeVisibilityPipelineStage.js:62 — EdgeVisibilityPipelineStage.EdgeVisibilityPipelineStage.process has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, 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 · ImageryLayerCollection.pickImageryHelper (cognitive 17) · ×1
  • ImageryLayerCollection.pickImageryHelper (cognitive 17) packages/engine/Source/Scene/ImageryLayerCollection.js:353 — ImageryLayerCollection.pickImageryHelper has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 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 · DataSourceDisplay.DataSourceDisplay.getBoundingSphere (cognitive 17) · ×1
  • DataSourceDisplay.DataSourceDisplay.getBoundingSphere (cognitive 17) packages/engine/Source/DataSources/DataSourceDisplay.js:380 — DataSourceDisplay.DataSourceDisplay.getBoundingSphere has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 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 · CameraFlightPath.createUpdate3D (cognitive 17) · ×1
  • CameraFlightPath.createUpdate3D (cognitive 17) packages/engine/Source/Scene/CameraFlightPath.js:221 — CameraFlightPath.createUpdate3D has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 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 · PostProcessStageComposite.isSelectedTextureDirty (cognitive 17) · ×1
  • PostProcessStageComposite.isSelectedTextureDirty (cognitive 17) packages/engine/Source/Scene/PostProcessStageComposite.js:261 — PostProcessStageComposite.isSelectedTextureDirty has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 1 (2 pts), ternaries 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 · GeoJsonPrimitive.normalizePolygon (cognitive 17) · ×1
  • GeoJsonPrimitive.normalizePolygon (cognitive 17) packages/engine/Source/Scene/GeoJsonPrimitive.js:770 — GeoJsonPrimitive.normalizePolygon has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (4 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 · I3SSymbology.I3SSymbology._getSymbology (cognitive 17) · ×1
  • I3SSymbology.I3SSymbology._getSymbology (cognitive 17) packages/engine/Source/Scene/I3SSymbology.js:281 — I3SSymbology.I3SSymbology._getSymbology has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 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 · decodeI3S.decodeDracoAttribute (cognitive 17) · ×1
  • decodeI3S.decodeDracoAttribute (cognitive 17) packages/engine/Source/Workers/decodeI3S.js:1204 — decodeI3S.decodeDracoAttribute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, loops 8. Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 1216, 1234, 1252, …). 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 · decodeI3S.decodeAndCreateGltf (cognitive 17) · ×1
  • decodeI3S.decodeAndCreateGltf (cognitive 17) packages/engine/Source/Workers/decodeI3S.js:1514 — decodeI3S.decodeAndCreateGltf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 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 · loadFromUrl.loadFromUrl (cognitive 17) · ×1
  • loadFromUrl.loadFromUrl (cognitive 17) packages/sandcastle/src/Gallery/loadFromUrl.ts:69 — loadFromUrl.loadFromUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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 · ConsoleWrapper.errorLineNumber (cognitive 17) · ×1
  • ConsoleWrapper.errorLineNumber (cognitive 17) packages/sandcastle/src/util/ConsoleWrapper.ts:100 — ConsoleWrapper.errorLineNumber has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (4 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 · TimelineTrack.TimelineTrack.render (cognitive 17) · ×1
  • TimelineTrack.TimelineTrack.render (cognitive 17) packages/widgets/Source/Timeline/TimelineTrack.js:13 — TimelineTrack.TimelineTrack.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 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.
D2 · Cognitive Complexity · splitTriangle (cognitive 17) · ×1
  • splitTriangle (cognitive 17) packages/core/Source/GeometryPipeline.js:1899 — splitTriangle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 3, boolean chains 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.
D2 · Cognitive Complexity · computeTriangleAttributes (cognitive 17) · ×1
  • computeTriangleAttributes (cognitive 17) packages/core/Source/GeometryPipeline.js:2168 — computeTriangleAttributes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 2). 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 · initializeMaterial (cognitive 17) · ×1
  • initializeMaterial (cognitive 17) packages/engine/Source/Scene/Material.js:696 — initializeMaterial has cognitive complexity 17 (threshold 15). Drivers by points: other 9, if/else 5 (6 pts), 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 · createMesh (cognitive 17) · ×1
  • createMesh (cognitive 17) packages/engine/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js:113 — createMesh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2, boolean chains 1, loops 1, other 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 · showErrorPanel (cognitive 17) · ×1
  • showErrorPanel (cognitive 17) packages/engine/Source/Widget/CesiumWidget.js:913 — showErrorPanel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2 (nesting depth added 8). Of this number, 15 points are the body's own statements and 2 belong to 3 function items inside it that branch. 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 · createIconStyleFromBillboard (cognitive 17) · ×1
  • createIconStyleFromBillboard (cognitive 17) packages/engine/Source/DataSources/exportKml.js:829 — createIconStyleFromBillboard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, other 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 · processLineStyleUniforms (cognitive 17) · ×1
  • processLineStyleUniforms (cognitive 17) packages/engine/Source/Scene/Model/MaterialPipelineStage.js:477 — processLineStyleUniforms has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 10 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · beginFrame (cognitive 17) · ×1
  • beginFrame (cognitive 17) packages/engine/Source/Scene/Globe.js:994 — beginFrame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packPolygonHierarchy (cognitive 17) · ×1
  • packPolygonHierarchy (cognitive 17) packages/core/Source/PolygonGeometryLibrary.js:63 — packPolygonHierarchy has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 3 (6 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getLogDepthShaderProgram (cognitive 17) · ×1
  • getLogDepthShaderProgram (cognitive 17) packages/engine/Source/Scene/DerivedCommand.js:139 — getLogDepthShaderProgram has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (6 pts), ternaries 2 (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 · barycentricCoordinates.barycentricCoordinates (cognitive 16) · ×1
  • barycentricCoordinates.barycentricCoordinates (cognitive 16) packages/core/Source/barycentricCoordinates.js:31 — barycentricCoordinates.barycentricCoordinates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 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.
D2 · Cognitive Complexity · PolylineVolumeGeometryLibrary.computeRoundCorner (cognitive 16) · ×1
  • PolylineVolumeGeometryLibrary.computeRoundCorner (cognitive 16) packages/core/Source/PolylineVolumeGeometryLibrary.js:230 — PolylineVolumeGeometryLibrary.computeRoundCorner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (3 pts), loops 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.
D2 · Cognitive Complexity · CorridorGeometry.computePositionsExtruded (cognitive 16) · ×1
  • CorridorGeometry.computePositionsExtruded (cognitive 16) packages/core/Source/CorridorGeometry.js:733 — CorridorGeometry.computePositionsExtruded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (4 pts), ternaries 1 (3 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 · TileAvailability.subtractRectangle (cognitive 16) · ×1
  • TileAvailability.subtractRectangle (cognitive 16) packages/engine/Source/Core/TileAvailability.js:507 — TileAvailability.subtractRectangle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 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 · Buffer.Buffer.getBufferData (cognitive 16) · ×1
  • Buffer.Buffer.getBufferData (cognitive 16) packages/engine/Source/Renderer/Buffer.js:372 — Buffer.Buffer.getBufferData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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 · ModelReader.computeInstanceTransforms (cognitive 16) · ×1
  • ModelReader.computeInstanceTransforms (cognitive 16) packages/engine/Source/Scene/Model/ModelReader.js:1032 — ModelReader.computeInstanceTransforms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Framebuffer.Framebuffer.destroy (cognitive 16) · ×1
  • Framebuffer.Framebuffer.destroy (cognitive 16) packages/engine/Source/Renderer/Framebuffer.js:419 — Framebuffer.Framebuffer.destroy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 5, loops 2 (4 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.
D2 · Cognitive Complexity · RenderState.RenderState.partialApply (cognitive 16) · ×1
  • RenderState.RenderState.partialApply (cognitive 16) packages/engine/Source/Renderer/RenderState.js:831 — RenderState.RenderState.partialApply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, ternaries 4, loops 1 (2 pts) (nesting depth added 2). 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 · VideoSynchronizer.VideoSynchronizer._onTick (cognitive 16) · ×1
  • VideoSynchronizer.VideoSynchronizer._onTick (cognitive 16) packages/engine/Source/Core/VideoSynchronizer.js:160 — VideoSynchronizer.VideoSynchronizer._onTick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, 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, 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 · BillboardVisualizer.BillboardVisualizer.update (cognitive 16) · ×1
  • BillboardVisualizer.BillboardVisualizer.update (cognitive 16) packages/engine/Source/DataSources/BillboardVisualizer.js:84 — BillboardVisualizer.BillboardVisualizer.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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 · Material.Material.update (cognitive 16) · ×1
  • Material.Material.update (cognitive 16) packages/engine/Source/Scene/Material.js:533 — Material.Material.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4, 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 · Expression.Node._evaluateLiteralVector (cognitive 16) · ×1
  • Expression.Node._evaluateLiteralVector (cognitive 16) REDACTED:1152 — Expression.Node._evaluateLiteralVector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · parseBatchTable.transcodeBinaryPropertiesAsPropertyAttributes (cognitive 16) · ×1
  • parseBatchTable.transcodeBinaryPropertiesAsPropertyAttributes (cognitive 16) packages/engine/Source/Scene/parseBatchTable.js:280 — parseBatchTable.transcodeBinaryPropertiesAsPropertyAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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 · ModelAnimationChannel.createSplines (cognitive 16) · ×1
  • ModelAnimationChannel.createSplines (cognitive 16) packages/engine/Source/Scene/Model/ModelAnimationChannel.js:175 — ModelAnimationChannel.createSplines has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 4 (6 pts) (nesting depth added 9). 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 · GeometryPipelineStage.GeometryPipelineStage.process (cognitive 16) · ×1
  • GeometryPipelineStage.GeometryPipelineStage.process (cognitive 16) packages/engine/Source/Scene/Model/GeometryPipelineStage.js:63 — GeometryPipelineStage.GeometryPipelineStage.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (2 pts), loops 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 · GetFeatureInfoFormat.esriXmlToFeatureInfo (cognitive 16) · ×1
  • GetFeatureInfoFormat.esriXmlToFeatureInfo (cognitive 16) packages/engine/Source/Scene/GetFeatureInfoFormat.js:182 — GetFeatureInfoFormat.esriXmlToFeatureInfo has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts) (nesting depth added 9). 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 · MaterialPipelineStage.processMaterialUniforms (cognitive 16) · ×1
  • MaterialPipelineStage.processMaterialUniforms (cognitive 16) packages/engine/Source/Scene/Model/MaterialPipelineStage.js:763 — MaterialPipelineStage.processMaterialUniforms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7 (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 · Cesium3DTile.Cesium3DTile.createBoundingVolume (cognitive 16) · ×1
  • Cesium3DTile.Cesium3DTile.createBoundingVolume (cognitive 16) packages/engine/Source/Scene/Cesium3DTile.js:1935 — Cesium3DTile.Cesium3DTile.createBoundingVolume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (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 · ImageryLayerCollection.ImageryLayerCollection._update (cognitive 16) · ×1
  • ImageryLayerCollection.ImageryLayerCollection._update (cognitive 16) packages/engine/Source/Scene/ImageryLayerCollection.js:795 — ImageryLayerCollection.ImageryLayerCollection._update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompositeEntityCollection.recomposite (cognitive 16) · ×1
  • CompositeEntityCollection.recomposite (cognitive 16) packages/engine/Source/DataSources/CompositeEntityCollection.js:43 — CompositeEntityCollection.recomposite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (7 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 · EntityCluster.EntityCluster.update (cognitive 16) · ×1
  • EntityCluster.EntityCluster.update (cognitive 16) packages/engine/Source/DataSources/EntityCluster.js:881 — EntityCluster.EntityCluster.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. 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 · CzmlDataSource.processModel (cognitive 16) · ×1
  • CzmlDataSource.processModel (cognitive 16) packages/engine/Source/DataSources/CzmlDataSource.js:3246 — CzmlDataSource.processModel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 2 (6 pts) (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 · PathVisualizer.computeVvlhTransform (cognitive 16) · ×1
  • PathVisualizer.computeVvlhTransform (cognitive 16) packages/engine/Source/DataSources/PathVisualizer.js:109 — PathVisualizer.computeVvlhTransform has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). 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 · GeoJsonDataSource.defaultDescribe (cognitive 16) · ×1
  • GeoJsonDataSource.defaultDescribe (cognitive 16) packages/engine/Source/DataSources/GeoJsonDataSource.js:70 — GeoJsonDataSource.defaultDescribe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, 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 · Camera.zoom2D (cognitive 16) · ×1
  • Camera.zoom2D (cognitive 16) packages/engine/Source/Scene/Camera.js:2173 — Camera.zoom2D has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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 · Camera.rectangleCameraPosition3D (cognitive 16) · ×1
  • Camera.rectangleCameraPosition3D (cognitive 16) packages/engine/Source/Scene/Camera.js:2584 — Camera.rectangleCameraPosition3D has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, 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, 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 · JobScheduler.JobScheduler.execute (cognitive 16) · ×1
  • JobScheduler.JobScheduler.execute (cognitive 16) packages/engine/Source/Scene/JobScheduler.js:135 — JobScheduler.JobScheduler.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, 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 · PickFramebuffer.pickObjectsFromPixels (cognitive 16) · ×1
  • PickFramebuffer.pickObjectsFromPixels (cognitive 16) packages/engine/Source/Scene/PickFramebuffer.js:47 — PickFramebuffer.pickObjectsFromPixels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, 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 · ShadowMap.ShadowMap.update (cognitive 16) · ×1
  • ShadowMap.ShadowMap.update (cognitive 16) packages/engine/Source/Scene/ShadowMap.js:1566 — ShadowMap.ShadowMap.update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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 · PostProcessStage.isSelectedTextureDirty (cognitive 16) · ×1
  • PostProcessStage.isSelectedTextureDirty (cognitive 16) packages/engine/Source/Scene/PostProcessStage.js:746 — PostProcessStage.isSelectedTextureDirty has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 1 (2 pts), ternaries 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 · ScreenSpaceCameraController.zoom3D (cognitive 16) · ×1
  • ScreenSpaceCameraController.zoom3D (cognitive 16) packages/engine/Source/Scene/ScreenSpaceCameraController.js:2320 — ScreenSpaceCameraController.zoom3D has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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, 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 · Scene.Scene.updateDerivedCommands (cognitive 16) · ×1
  • Scene.Scene.updateDerivedCommands (cognitive 16) packages/engine/Source/Scene/Scene.js:1896 — Scene.Scene.updateDerivedCommands has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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 · Scene.renderEnvironment (cognitive 16) · ×1
  • Scene.renderEnvironment (cognitive 16) packages/engine/Source/Scene/Scene.js:3165 — Scene.renderEnvironment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 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 · Scene.Scene.updateHeight (cognitive 16) · ×1
  • Scene.Scene.updateHeight (cognitive 16) packages/engine/Source/Scene/Scene.js:4309 — Scene.Scene.updateHeight has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, loops 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 4319, 4381, 4352, …). 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 · GlobeSurfaceTile.updateExaggeration (cognitive 16) · ×1
  • GlobeSurfaceTile.updateExaggeration (cognitive 16) packages/engine/Source/Scene/GlobeSurfaceTile.js:417 — GlobeSurfaceTile.updateExaggeration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 1 (3 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.
D2 · Cognitive Complexity · I3SNode.filterFeatures (cognitive 16) · ×1
  • I3SNode.filterFeatures (cognitive 16) packages/engine/Source/Scene/I3SNode.js:771 — I3SNode.filterFeatures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (7 pts), boolean chains 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 · decodeMVT.decodeValue (cognitive 16) · ×1
  • decodeMVT.decodeValue (cognitive 16) packages/engine/Source/Scene/decodeMVT.js:404 — decodeMVT.decodeValue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · decodeI3S.decodeBinaryGeometry (cognitive 16) · ×1
  • decodeI3S.decodeBinaryGeometry (cognitive 16) packages/engine/Source/Workers/decodeI3S.js:1437 — decodeI3S.decodeBinaryGeometry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), 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 · main.handler.setInputAction() (cognitive 16) · ×1
  • main.handler.setInputAction() (cognitive 16) packages/sandcastle/gallery/3d-tiles-1.1-cdb-yemen/main.js:175 — main.handler.setInputAction() has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 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 · AnchorPointVisualizer.initialize (cognitive 16) · ×1
  • AnchorPointVisualizer.initialize (cognitive 16) packages/sandcastle/gallery/3d-tiles-nga-gpm-visualization/main.js:886 — AnchorPointVisualizer.initialize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3, boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 906). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 16) · ×1
  • main.viewer.screenSpaceEventHandler.setInputAction() (cognitive 16) packages/sandcastle/gallery/i3s-building-scene-layer/main.js:84 — main.viewer.screenSpaceEventHandler.setInputAction() has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 114). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Viewer.enableVRUI (cognitive 16) · ×1
  • Viewer.enableVRUI (cognitive 16) packages/widgets/Source/Viewer/Viewer.js:249 — Viewer.enableVRUI has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, ternaries 2 (3 pts), boolean chains 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 · moveCoreFiles.checkFile (cognitive 16) · ×1
  • moveCoreFiles.checkFile (cognitive 16) scripts/moveCoreFiles.js:64 — moveCoreFiles.checkFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, loops 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 · render (cognitive 16) · ×1
  • render (cognitive 16) packages/engine/Source/Scene/Scene.js:4629 — render has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (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 · updateClock (cognitive 16) · ×1
  • updateClock (cognitive 16) packages/engine/Source/DataSources/CzmlDataSource.js:4666 — updateClock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), other 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · createTileUniformMap (cognitive 16) · ×1
  • createTileUniformMap (cognitive 16) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:1909 — createTileUniformMap has cognitive complexity 16 (threshold 15). Drivers by points: other 12, if/else 2, boolean chains 1, ternaries 1. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 65 function items inside it that branch (u_clippingPlanes, u_clippingPlanesMatrix, u_vectorSegmentTexture, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · constructor (cognitive 16) · ×1
  • constructor (cognitive 16) packages/core/Source/Matrix4.js:81 — constructor has cognitive complexity 16 (threshold 15). Drivers by points: other 16. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · combineQueryParameters (cognitive 16) · ×1
  • combineQueryParameters (cognitive 16) packages/engine/Source/Core/Resource.js:510 — combineQueryParameters has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 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 · Primitive (cognitive 16) · ×1
  • Primitive (cognitive 16) packages/engine/Source/Scene/Primitive.js:156 — Primitive has cognitive complexity 16 (threshold 15). Drivers by points: other 12, boolean chains 3, if/else 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 · BillboardCollection (cognitive 16) · ×1
  • BillboardCollection (cognitive 16) packages/engine/Source/Scene/BillboardCollection.js:132 — BillboardCollection has cognitive complexity 16 (threshold 15). Drivers by points: other 8, if/else 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fromCssColorString (cognitive 16) · ×1
  • fromCssColorString (cognitive 16) packages/core/Source/Color.js:362 — fromCssColorString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 3 (6 pts), other 4 (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 · ImageryLayer (cognitive 16) · ×1
  • ImageryLayer (cognitive 16) packages/engine/Source/Scene/ImageryLayer.js:176 — ImageryLayer has cognitive complexity 16 (threshold 15). Drivers by points: other 16. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fromSubtreeJson (cognitive 16) · ×1
  • fromSubtreeJson (cognitive 16) packages/engine/Source/Scene/ImplicitSubtree.js:317 — fromSubtreeJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 2 (3 pts), other 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VertexArray (cognitive 16) · ×1
  • VertexArray (cognitive 16) packages/engine/Source/Renderer/VertexArray.js:293 — VertexArray has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4, boolean chains 2, other 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 · getAttributes (cognitive 16) · ×1
  • getAttributes (cognitive 16) packages/engine/Source/Core/TerrainEncoding.js:668 — getAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (6 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: GlobeSurfaceTile (LCOM4 5) packages/engine/Source/Scene/GlobeSurfaceTile.js:52 — GlobeSurfaceTile's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 1619 JavaScript/TypeScript production file(s) this check read across 5 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
R10 · Code Duplication · Duplication concentrated across 227 sibling directories (230 clone groups) · ×1
  • Duplication concentrated across 227 sibling directories (230 clone groups) packages/sandcastle/gallery/aec-snapping/main.js:12 — 230 duplicated blocks under packages/sandcastle/gallery/ have copies in at least two of the sibling directories 3d-models, 3d-models-articulations-dev, 3d-models-coloring, 3d-models-dev, 3d-models-node-explorer-dev, 3d-tiles-1.1-cdb-yemen (+221 more sibling(s) not listed) — 174 of them are reported below, and 56 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 230 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 230 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 230 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (139 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (139 clone groups) packages/engine/Source/DataSources/DataSourceCollection.js:15 — 139 duplicated blocks under packages/engine/Source/ have copies in at least two of the sibling directories Core, DataSources, Renderer, Scene, Widget, Workers — 48 of them are reported below, and 91 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 139 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 139 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 139 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (132 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (132 clone groups) packages/core/Source/PolylineGeometry.js:422 — 132 duplicated blocks under packages/ have copies in at least two of the sibling directories core, engine, sandcastle, widgets — 47 of them are reported below, and 85 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 132 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 132 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 132 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 15 sibling directories (23 clone groups) · ×1
  • Duplication concentrated across 15 sibling directories (23 clone groups) packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.js:29 — 23 duplicated blocks under packages/widgets/Source/ have copies in at least two of the sibling directories Animation, BaseLayerPicker, Cesium3DTilesInspector, CesiumInspector, FullscreenButton, Geocoder (+9 more sibling(s) not listed) — 14 of them are reported below, and 9 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 23 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (421 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (421 matched lines × 2 locations) packages/engine/Source/Scene/BillboardCollection.js:191 — packages/engine/Source/Scene/BillboardCollection.js:191 · packages/engine/Source/Scene/PointPrimitiveCollection.js:125 — the two spans are one implementation copied and then locally edited — 1999 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (337 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (337 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGeometryColorBatch.js:19 — packages/engine/Source/DataSources/StaticGeometryColorBatch.js:19 · packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:18 — the two spans are one implementation copied and then locally edited — 1831 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (335 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (335 matched lines × 2 locations) packages/engine/Source/Scene/Vector3DTileClampedPolylines.js:177 — packages/engine/Source/Scene/Vector3DTileClampedPolylines.js:177 · packages/engine/Source/Scene/Vector3DTilePolylines.js:139 — the two spans are one implementation copied and then locally edited — 1843 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (269 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (269 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:28 — packages/engine/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js:28 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:37 — the two spans are one implementation copied and then locally edited — 1651 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (257 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (257 matched lines × 2 locations) packages/engine/Source/Scene/VoxelBoxShape.js:75 — packages/engine/Source/Scene/VoxelBoxShape.js:75 · packages/engine/Source/Scene/VoxelCylinderShape.js:53 — the two spans are one implementation copied and then locally edited — 1366 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (251 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (251 matched lines × 2 locations) packages/core/Source/OrthographicOffCenterFrustum.js:39 — packages/core/Source/OrthographicOffCenterFrustum.js:39 · packages/core/Source/PerspectiveOffCenterFrustum.js:47 — the two spans are one implementation copied and then locally edited — 1424 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (248 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (248 matched lines × 2 locations) packages/core/Source/Cartesian3.js:110 — packages/core/Source/Cartesian3.js:110 · packages/core/Source/Cartesian4.js:117 — the two spans are one implementation copied and then locally edited — 1961 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (240 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (240 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGeometryColorBatch.js:81 — packages/engine/Source/DataSources/StaticGeometryColorBatch.js:81 · packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:40 — the two spans are one implementation copied and then locally edited — 1428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (229 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (229 matched lines × 2 locations) packages/engine/Source/Scene/WebMapServiceImageryProvider.js:114 — packages/engine/Source/Scene/WebMapServiceImageryProvider.js:114 · packages/engine/Source/Scene/WebMapTileServiceImageryProvider.js:191 — the two spans are one implementation copied and then locally edited — 1133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (226 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (226 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:16 — packages/engine/Source/DataSources/StaticGroundGeometryColorBatch.js:16 · packages/engine/Source/DataSources/StaticOutlineGeometryBatch.js:20 — the two spans are one implementation copied and then locally edited — 1388 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (224 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (224 matched lines × 2 locations) packages/engine/Source/Renderer/Texture.js:74 — packages/engine/Source/Renderer/Texture.js:74 · packages/engine/Source/Renderer/Texture3D.js:91 — the two spans are one implementation copied and then locally edited — 1065 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (209 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (209 matched lines × 2 locations) packages/engine/Source/Scene/Vector3DTileGeometry.js:75 — packages/engine/Source/Scene/Vector3DTileGeometry.js:75 · packages/engine/Source/Scene/Vector3DTilePolygons.js:77 — the two spans are one implementation copied and then locally edited — 1288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (205 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (205 matched lines × 2 locations) packages/engine/Source/Scene/BillboardCollection.js:1729 — packages/engine/Source/Scene/BillboardCollection.js:1729 · packages/engine/Source/Scene/PointPrimitiveCollection.js:902 — the two spans are one implementation copied and then locally edited — 1118 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (182 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (182 matched lines × 2 locations) packages/engine/Source/DataSources/BillboardVisualizer.js:30 — packages/engine/Source/DataSources/BillboardVisualizer.js:30 · packages/engine/Source/DataSources/LabelVisualizer.js:31 — the two spans are one implementation copied and then locally edited — 877 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (181 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (181 matched lines × 2 locations) packages/engine/Source/DataSources/BoxGeometryUpdater.js:54 — packages/engine/Source/DataSources/BoxGeometryUpdater.js:54 · packages/engine/Source/DataSources/CylinderGeometryUpdater.js:63 — the two spans are one implementation copied and then locally edited — 899 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (176 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (176 matched lines × 2 locations) packages/engine/Source/Scene/ClippingPlaneCollection.js:142 — packages/engine/Source/Scene/ClippingPlaneCollection.js:142 · packages/engine/Source/Scene/VoxelBoundsCollection.js:79 — the two spans are one implementation copied and then locally edited — 949 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (174 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (174 matched lines × 2 locations) packages/sandcastle/gallery/aec-snapping/main.js:12 — packages/sandcastle/gallery/aec-snapping/main.js:12 · packages/sandcastle/gallery/hybrid-snapping-dev/main.js:45 — the two spans are one implementation copied and then locally edited — 1096 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (165 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (165 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:310 — packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:310 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:252 — the two spans are one implementation copied and then locally edited — 1013 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (164 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (164 matched lines × 2 locations) packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js:76 — packages/engine/Source/DataSources/PolylineVolumeGeometryUpdater.js:76 · packages/engine/Source/DataSources/WallGeometryUpdater.js:66 — the two spans are one implementation copied and then locally edited — 805 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (162 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (162 matched lines × 2 locations) packages/engine/Source/Scene/Model/B3dmLoader.js:67 — packages/engine/Source/Scene/Model/B3dmLoader.js:67 · packages/engine/Source/Scene/Model/I3dmLoader.js:79 — the two spans are one implementation copied and then locally edited — 839 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (151 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (151 matched lines × 2 locations) packages/engine/Source/Scene/GroundPolylinePrimitive.js:574 — packages/engine/Source/Scene/GroundPolylinePrimitive.js:574 · packages/engine/Source/Scene/GroundPrimitive.js:533 — the two spans are one implementation copied and then locally edited — 682 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (142 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (142 matched lines × 2 locations) packages/core/Source/OrthographicFrustum.js:65 — packages/core/Source/OrthographicFrustum.js:65 · packages/core/Source/PerspectiveFrustum.js:91 — the two spans are one implementation copied and then locally edited — 738 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (141 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (141 matched lines × 2 locations) packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:54 — packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:54 · packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts:278 — the two spans are one implementation copied and then locally edited — 735 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (139 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (139 matched lines × 2 locations) packages/engine/Source/Scene/Composite3DTileContent.js:34 — packages/engine/Source/Scene/Composite3DTileContent.js:34 · packages/engine/Source/Scene/Multiple3DTileContent.js:81 — the two spans are one implementation copied and then locally edited — 679 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (138 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (138 matched lines × 2 locations) packages/core/Source/EllipseGeometry.js:1030 — packages/core/Source/EllipseGeometry.js:1030 · packages/core/Source/RectangleGeometry.js:1112 — the two spans are one implementation copied and then locally edited — 757 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (135 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (135 matched lines × 2 locations) packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:37 — packages/engine/Source/DataSources/StaticGeometryPerMaterialBatch.js:37 · packages/engine/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js:37 — the two spans are one implementation copied and then locally edited — 832 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (131 lines × 2 locations) · ×1
  • Duplicated block (131 lines × 2 locations) packages/engine/Source/DataSources/CorridorGeometryUpdater.js:27 — packages/engine/Source/DataSources/CorridorGeometryUpdater.js:27 · packages/engine/Source/DataSources/EllipseGeometryUpdater.js:27 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (130 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (130 matched lines × 2 locations) packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js:306 — packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js:306 · packages/engine/Source/Core/QuantizedMeshTerrainData.js:435 — the two spans are one implementation copied and then locally edited — 730 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (125 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (125 matched lines × 2 locations) packages/engine/Source/Scene/GltfIndexBufferLoader.js:24 — packages/engine/Source/Scene/GltfIndexBufferLoader.js:24 · packages/engine/Source/Scene/GltfVertexBufferLoader.js:24 — the two spans are one implementation copied and then locally edited — 714 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (123 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (123 matched lines × 2 locations) packages/engine/Source/Scene/Model/Model.js:844 — packages/engine/Source/Scene/Model/Model.js:844 · packages/engine/Source/Scene/Model/Model.js:1423 — the two spans are one implementation copied and then locally edited — 500 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) packages/engine/Source/Scene/Geometry3DTileContent.js:23 — packages/engine/Source/Scene/Geometry3DTileContent.js:23 · packages/engine/Source/Scene/Vector3DTileContent.js:37 — the two spans are one implementation copied and then locally edited — 604 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (114 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (114 matched lines × 2 locations) packages/engine/Source/Scene/GltfDracoLoader.js:15 — packages/engine/Source/Scene/GltfDracoLoader.js:15 · packages/engine/Source/Scene/GltfSpzLoader.js:91 — the two spans are one implementation copied and then locally edited — 658 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (112 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (112 matched lines × 2 locations) packages/core/Source/WallGeometry.js:253 — packages/core/Source/WallGeometry.js:253 · packages/core/Source/WallOutlineGeometry.js:230 — the two spans are one implementation copied and then locally edited — 629 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (111 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (111 matched lines × 2 locations) packages/sandcastle/gallery/geometry-offset-attribute-box-cylinder-ellipsoid-dev/main.js:6 — packages/sandcastle/gallery/geometry-offset-attribute-box-cylinder-ellipsoid-dev/main.js:6 · packages/sandcastle/gallery/geometry-offset-attribute-dev/main.js:6 — the two spans are one implementation copied and then locally edited — 659 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 108, cognitive 184) · ×1
  • Complex function update (cyclomatic 108, cognitive 184) packages/engine/Source/Scene/BillboardCollection.js:1569 — update has cyclomatic complexity 108 and cognitive complexity 184; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function addDrawCommandsForTile (cyclomatic 107, cognitive 147) · ×1
  • Complex function addDrawCommandsForTile (cyclomatic 107, cognitive 147) packages/engine/Source/Scene/GlobeSurfaceTileProvider.js:2510 — addDrawCommandsForTile has cyclomatic complexity 107 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function intersectPlaneTestCornersEdgesFaces (cyclomatic 105, cognitive 104) · ×1
  • Complex function intersectPlaneTestCornersEdgesFaces (cyclomatic 105, cognitive 104) packages/core/Specs/OrientedBoundingBoxSpec.js:960 — intersectPlaneTestCornersEdgesFaces has cyclomatic complexity 105 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function RenderState (cyclomatic 96, cognitive 99) · ×1
  • Complex function RenderState (cyclomatic 96, cognitive 99) packages/engine/Source/Renderer/RenderState.js:93 — RenderState has cyclomatic complexity 96 and cognitive complexity 99; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getShaderExpression (cyclomatic 90, cognitive 98) · ×1
  • Complex function getShaderExpression (cyclomatic 90, cognitive 98) REDACTED:1906 — getShaderExpression has cyclomatic complexity 90 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getShaderProgram (cyclomatic 84, cognitive 154) · ×1
  • Complex function getShaderProgram (cyclomatic 84, cognitive 154) packages/engine/Source/Scene/GlobeSurfaceShaderSet.js:105 — getShaderProgram has cyclomatic complexity 84 and cognitive complexity 154; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function computeAttributes (cyclomatic 73, cognitive 209) · ×1
  • Complex function computeAttributes (cyclomatic 73, cognitive 209) packages/core/Source/PolygonGeometry.js:62 — computeAttributes has cyclomatic complexity 73 and cognitive complexity 209; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createGeometry (cyclomatic 69, cognitive 112) · ×1
  • Complex function createGeometry (cyclomatic 69, cognitive 112) packages/core/Source/EllipsoidGeometry.js:231 — createGeometry has cyclomatic complexity 69 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function fromIso8601 (cyclomatic 69, cognitive 103) · ×1
  • Complex function fromIso8601 (cyclomatic 69, cognitive 103) packages/core/Source/JulianDate.js:312 — fromIso8601 has cyclomatic complexity 69 and cognitive complexity 103; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Cesium3DTileset (cyclomatic 68, cognitive 68) · ×1
  • Complex function Cesium3DTileset (cyclomatic 68, cognitive 68) packages/engine/Source/Scene/Cesium3DTileset.js:212 — Cesium3DTileset has cyclomatic complexity 68 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Viewer (cyclomatic 66, cognitive 77) · ×1
  • Complex function Viewer (cyclomatic 66, cognitive 77) packages/widgets/Source/Viewer/Viewer.js:429 — Viewer has cyclomatic complexity 66 and cognitive complexity 77; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 64, cognitive 106) · ×1
  • Complex function update (cyclomatic 64, cognitive 106) packages/engine/Source/Scene/PointPrimitiveCollection.js:845 — update has cyclomatic complexity 64 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createShaders (cyclomatic 64, cognitive 78) · ×1
  • Complex function createShaders (cyclomatic 64, cognitive 78) REDACTED:770 — createShaders has cyclomatic complexity 64 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function computeVertices (cyclomatic 62, cognitive 106) · ×1
  • Complex function computeVertices (cyclomatic 62, cognitive 106) packages/engine/Source/Core/HeightmapTessellator.js:117 — computeVertices has cyclomatic complexity 62 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function constructExtrudedRectangle (cyclomatic 60, cognitive 106) · ×1
  • Complex function constructExtrudedRectangle (cyclomatic 60, cognitive 106) packages/core/Source/RectangleGeometry.js:457 — constructExtrudedRectangle has cyclomatic complexity 60 and cognitive complexity 106; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 57, cognitive 98) · ×1
  • Complex function update (cyclomatic 57, cognitive 98) packages/engine/Source/Scene/GaussianSplatPrimitive.js:1686 — update has cyclomatic complexity 57 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createLayeredEntries (cyclomatic 56, cognitive 105) · ×1
  • Complex function createLayeredEntries (cyclomatic 56, cognitive 105) packages/engine/Source/Scene/createElevationBandMaterial.js:202 — createLayeredEntries has cyclomatic complexity 56 and cognitive complexity 105; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function update (cyclomatic 54, cognitive 54) · ×1
  • Complex function update (cyclomatic 54, cognitive 54) packages/engine/Source/Scene/VoxelEllipsoidShape.js:236 — update has cyclomatic complexity 54 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Texture (cyclomatic 53, cognitive 63) · ×1
  • Complex function Texture (cyclomatic 53, cognitive 63) packages/engine/Source/Renderer/Texture.js:50 — Texture has cyclomatic complexity 53 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleZoom (cyclomatic 51, cognitive 95) · ×1
  • Complex function handleZoom (cyclomatic 51, cognitive 95) packages/engine/Source/Scene/ScreenSpaceCameraController.js:561 — handleZoom has cyclomatic complexity 51 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · Large Files · ×1
  • Large Files — 516 file(s) over 400 lines (counted as significant lines — blank lines excluded — over production source only, tests excluded), largest first: packages/engine/Specs/DataSources/CzmlDataSourceSpec.js (9570), packages/engine/Specs/Scene/Cesium3DTilesetSpec.js (6087), packages/engine/Specs/DataSources/KmlDataSourceSpec.js (5259), packages/engine/Source/Scene/Scene.js (4971), packages/engine/Source/DataSources/CzmlDataSource.js (4888), packages/engine/Specs/Scene/Model/ModelSpec.js (4597) (+510 more).
R7 · Dead Code · Dead file (~512 LoC) · ×1
  • Dead file (~512 LoC) Tools/jsdoc/cesium_template/publish.js — no import path from any entry point (298 application, 19 tooling, 802 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~96 LoC) · ×1
  • Dead file (~96 LoC) Tools/jsdoc/cesiumTags.js — no import path from any entry point (298 application, 19 tooling, 802 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'gulp-clean-css' · ×1
  • Unused dependency 'gulp-clean-css' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'gulp-insert' · ×1
  • Unused dependency 'gulp-insert' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'gulp-replace' · ×1
  • Unused dependency 'gulp-replace' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked — No package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock — JS installs aren't reproducible (SSDF PW.4.4). Commit your package manager's lockfile and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Minor — 34 finding(s)
D16 · Bus Factor · Off-boarding risk · ×12
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 26 significant file(s) lose their only recent owner: packages/core/Source/Quaternion.js, packages/engine/Source/Scene/VoxelEllipsoidShape.js, packages/engine/Source/Scene/VoxelCylinderShape.js, packages/engine/Source/Scene/Cesium3DTilesVoxelProvider.js, packages/core/Source/EllipsoidalOccluder.js, packages/engine/Source/Core/TerrainProvider.js, packages/core/Source/PolygonPipeline.js, packages/core/Source/PolylinePipeline.js (+18 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 18 significant file(s) lose their only recent owner: packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts, packages/sandcastle/src/copilot/ai/diff/DiffMatcher.ts, packages/sandcastle/src/copilot/hooks/useToolChainExecution.ts, packages/sandcastle/src/copilot/ApiKeyDialog.tsx, packages/sandcastle/src/copilot/ai/clients/AnthropicClient.ts, packages/sandcastle/src/copilot/ai/prompts/PromptBuilder.ts, packages/sandcastle/src/copilot/ChatMessage.tsx, packages/sandcastle/src/copilot/ai/clients/AIClientFactory.ts (+10 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: packages/sandcastle/gallery/hybrid-snapping-dev/main.js, packages/engine/Source/Core/IonSnapService.js, packages/sandcastle/gallery/multifrustum-snapping-dev/main.js, packages/engine/Source/Scene/Snapping.js, packages/sandcastle/gallery/ion-snapping-dev/main.js, packages/sandcastle/gallery/gltf-planar-fill-dev/main.js, packages/sandcastle/gallery/client-side-snapping-dev/main.js, packages/engine/Source/Scene/PlanarFillIdFramebuffer.js (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 11 significant file(s) lose their only recent owner: packages/engine/Source/Scene/Cesium3DTileFeature.js, packages/sandcastle/gallery/ground-primitive-materials-dev/main.js, packages/engine/Source/Core/WebMercatorTilingScheme.js, packages/engine/Source/Scene/Cesium3DTileContent.js, packages/engine/Source/Scene/BufferPrimitive.js, packages/sandcastle/gallery/3d-models-node-explorer-dev/main.js, packages/engine/Source/Core/TilingScheme.js, packages/engine/Source/Scene/BufferPrimitiveMaterial.js (+3 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 10 significant file(s) lose their only recent owner: packages/engine/Source/Scene/MetadataClassProperty.js, packages/engine/Source/Scene/Model/MetadataPipelineStage.js, packages/engine/Source/Scene/Model/CustomShaderPipelineStage.js, packages/engine/Source/Scene/PropertyTable.js, packages/engine/Source/Scene/MetadataComponentType.js, packages/engine/Source/Scene/parseStructuralMetadata.js, packages/engine/Source/Scene/Cesium3DTilesetBaseTraversal.js, packages/engine/Source/Scene/StructuralMetadata.js (+2 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 7 significant file(s) lose their only recent owner: packages/widgets/Source/BaseLayerPicker/createDefaultImageryProviderViewModels.js, packages/engine/Source/Scene/CubeMapPanorama.js, packages/sandcastle/gallery/google-streetview-panorama/main.js, packages/engine/Source/Scene/GoogleStreetViewCubeMapPanoramaProvider.js, packages/engine/Source/Scene/EquirectangularPanorama.js, packages/sandcastle/gallery/panorama/main.js, packages/engine/Source/Core/Credit.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 10 significant file(s) lose their only recent owner: packages/engine/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js, packages/engine/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js, packages/engine/Source/Scene/Controllers/ScreenSpaceMapCameraController.js, packages/engine/Source/Core/Iau2006XysData.js, packages/engine/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js, packages/engine/Source/Scene/Controllers/ScreenSpaceInputBindings.js, packages/engine/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js, packages/engine/Source/Scene/Controllers/defaultPickWorldPosition.js (+2 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 6 significant file(s) lose their only recent owner: packages/engine/Source/Scene/Model/ModelPrimitiveImagery.js, packages/engine/Source/Scene/GroundPolylinePrimitive.js, packages/engine/Source/Scene/Model/ModelImageryMapping.js, packages/engine/Source/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoader.js, packages/engine/Source/Scene/MetadataPicking.js, packages/engine/Source/Scene/Model/ModelImagery.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 6 significant file(s) lose their only recent owner: packages/engine/Source/Scene/buildVectorGltfFromMVT.js, packages/engine/Source/Scene/decodeMVT.js, packages/engine/Source/Scene/EdgeFramebuffer.js, packages/engine/Source/Scene/Model/ModelVectorLookupPipelineStage.js, packages/engine/Source/Scene/MVTDataProvider.js, packages/engine/Source/Scene/preprocess3DTileContent.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 5 significant file(s) lose their only recent owner: packages/engine/Source/DataSources/PathVisualizer.js, packages/sandcastle/gallery/time-dependent-path-graphics/main.js, packages/engine/Source/DataSources/PathGraphics.js, packages/sandcastle/gallery/relative-paths/main.js, packages/sandcastle/gallery/constant-lod-dev/main.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 3 significant file(s) lose their only recent owner: REDACTED, REDACTED, packages/sandcastle/gallery/aec-snapping/main.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: packages/sandcastle/src/Bucket.tsx, packages/sandcastle/src/ViewerConsoleStack.tsx, packages/sandcastle/src/setupSandcastleSnippets.ts. Pair on, review, or document these before any departure.
X10 · Duplicated predicate · Duplicated predicate · ×3
  • Duplicated predicate packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts:223 — `!line.trim() || !line.startsWith("data: ")` appears character-identically in 2 files — packages/sandcastle/src/copilot/ai/clients/GeminiClient.ts, packages/sandcastle/src/copilot/ai/clients/VertexAIClient.ts. 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 packages/sandcastle/gallery/i3s-3d-object-layer/main.js:97 — `name.localeCompare("name") === 0 || name.localeCompare("objname") === 0` appears character-identically in 2 files — packages/sandcastle/gallery/i3s-3d-object-layer/main.js, packages/sandcastle/gallery/i3s-feature-picking/main.js. 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 packages/engine/Source/Renderer/ShaderBuilder.js:257 — `typeof lines !== "string" && !Array.isArray(lines)` appears character-identically in 2 files — packages/engine/Source/Renderer/ShaderBuilder.js, packages/engine/Source/Renderer/ShaderFunction.js. 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.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex packages/engine/Source/Scene/GetFeatureInfoFormat.js:368 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/engine/Source/Scene/GetFeatureInfoFormat.js:370 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex packages/engine/Source/Scene/GetFeatureInfoFormat.js:371 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 8 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 (129 single-owned of 990 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; 990 of the 1616 production source files in this repository met that bar). They are anonymized user #13 (2 file(s)), anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)), anonymized user #16 (1 file(s)), anonymized user #17 (1 file(s)), anonymized user #18 (1 file(s)) (+2 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
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/`.
D26 · Project Cohesion · Split packages/engine · ×1
  • Split packages/engine — At 290k LoC this is a massive sprawling engine whose listed namespaces (Scene/Model/GltfPipeline, ThirdParty) are all unrelated parts of one system. Suggested: split into Scene/Model and ThirdParty namespaces
D26 · Project Cohesion · Split packages/sandcastle · ×1
  • Split packages/sandcastle — At 54k LoC this is a large test framework whose namespaces (copilot/ai, copilot/hooks) are all unrelated. Suggested: split into copilot/ai and copilot/hooks namespaces
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Scanner failed to run · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 319 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: packages/engine/Source/Renderer/ShaderProgram.js, packages/widgets/Source/Animation/AnimationViewModel.js, packages/core/Source/CorridorOutlineGeometry.js, packages/engine/Source/DataSources/CompositeEntityCollection.js, packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js, packages/core/Source/CoplanarPolygonGeometry.js, packages/core/Source/PolylineGeometry.js, packages/engine/Source/DataSources/LabelGraphics.js (and 311 more) (360 orphaned of 990 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; 990 of the 1616 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
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D43 · Malicious Dependencies · Scanner failed to run · ×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.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift — README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 18517 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.
Minor — 17 finding(s)
D10 · Test Quality · Skipped (documented) · ×16
  • Skipped (documented): (unnamed test) Specs/test.mjs:6 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) Specs/test.mjs:18 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) Specs/test.cjs:12 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) Specs/test.cjs:24 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): compute all vertex attributes packages/core/Specs/PolylineVolumeGeometrySpec.js:116 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): (unnamed test) packages/engine/Specs/test.mjs:6 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/engine/Specs/test.mjs:19 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): can support 2xx HTTP status (other than 200) packages/engine/Specs/Core/ResourceSpec.js:2100 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): update is visible with zero scale for one component packages/engine/Specs/Scene/VoxelBoxShapeSpec.js:119 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): renders clamped polylines packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js:98 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): picks a clamped polyline packages/engine/Specs/Scene/Vector3DTileClampedPolylinesSpec.js:115 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): renders with distance display condition per instance attribute packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js:701 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): renders in Columbus view when scene3DOnly is false packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js:389 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): renders in 2D when scene3DOnly is false packages/engine/Specs/Scene/ClassificationPrimitiveSpec.js:403 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): does not request tiles when the request scheduler is full packages/engine/Specs/Scene/Cesium3DTilesetSpec.js:2233 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
  • Skipped (documented): renders model with emissive texture packages/engine/Specs/Scene/Model/ModelSpec.js:672 — Skipped with a documented reason — a deferral, not lazy debt: switched off by xit
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no committed lockfile, so no resolved version to grade) — This repository's npm dependencies were read for PINNING discipline: 55 production declaration(s) plus 63 development one(s) across 5 package.json (5 of them the product — the rest are example, documentation or fixture manifests, which are read and counted but screened off the rules below, because both prescribe a MOVE and "align your example apps" is not a remedy), against 0 committed lockfile(s). No pinning defect was found. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer, deprecated or abandoned release is the dependency-CURRENCY question, and answering it needs a lockfile resolved to concrete versions, which this repository does not commit: a package.json states version RANGES, and a range names no particular release to be behind. So there was nothing here for the registry to grade — that is a fact about the repository, not a reader we are missing, and no lockfile reader we could write would change it. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED. Note also what is deliberately NOT charged here: a workspace legitimately carries ONE lockfile for many manifests, so no row is raised off the lockfile count, only reported. Known CVEs in the same dependency graph are a separate question again, reported under D30 wherever the manifest is OSV-readable.

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-892ec7c409254a058b811844b9342760/history.json --exit-code 0 --source .409artifacts/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-892ec7c409254a058b811844b9342760/tree.json --exit-code 0 --source .11artifacts/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 .47artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
D30 · Dependency Vulnerabilitiestrivy—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
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `packages/engine/Source/Scene/ScreenSpaceCameraController.js`, `packages/engine/Specs/DataSources/CzmlDataSourceSpec.js` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .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 01a0f976-a34b-7195-9db6-d1827cbbb198 · 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