[Tech debt] SonarQube S2368: public method exposes jagged/multidimensional array (TrailGeometry) #248

Closed
opened 2026-06-19 18:45:00 +00:00 by spikerj · 1 comment
Owner

Surfaced by SonarQube (api.spikersoft.com), rule csharpsquid:S2368, severity BLOCKER (MAINTAINABILITY). Public APIs taking multidimensional/jagged arrays are error-prone and hard to consume.

Locations

  • SpikerSoft.Data/Mongos/Map/Trail/TrailGeometry.cs:25
  • SpikerSoft.Data/Mongos/Map/Trail/TrailGeometry.cs:34

Fix

Make the method private, or replace the jagged/multidim parameter with a clearer type (e.g. a collection of a small struct/record, or a flattened representation with explicit dimensions).

Rule: https://rules.sonarsource.com/csharp/RSPEC-2368/

Surfaced by SonarQube (`api.spikersoft.com`), rule `csharpsquid:S2368`, severity BLOCKER (MAINTAINABILITY). Public APIs taking multidimensional/jagged arrays are error-prone and hard to consume. ## Locations - `SpikerSoft.Data/Mongos/Map/Trail/TrailGeometry.cs:25` - `SpikerSoft.Data/Mongos/Map/Trail/TrailGeometry.cs:34` ## Fix Make the method `private`, or replace the jagged/multidim parameter with a clearer type (e.g. a collection of a small struct/record, or a flattened representation with explicit dimensions). _Rule: https://rules.sonarsource.com/csharp/RSPEC-2368/_
spikerj added the sonarqube label 2026-06-19 18:45:00 +00:00
Author
Owner

Resolved in spikersoft-backend PR #12 (merged to master). TrailGeometry.Create/CreateMultiLine params changed from jagged arrays to IReadOnlyList<...>; the 3 call sites use collection-expression literals so no caller changes were needed. Closing.

Resolved in spikersoft-backend PR #12 (merged to `master`). `TrailGeometry.Create`/`CreateMultiLine` params changed from jagged arrays to `IReadOnlyList<...>`; the 3 call sites use collection-expression literals so no caller changes were needed. Closing.
Sign in to join this conversation.