Skip to content

[Sprint 6] fix(quality): resolve Domain and ServiceDefaults CA warnings (CA1000, CA2225, CA1062, CA1307, CA1014) #140

Description

@mpaulosky

Summary

Resolve remaining CA warnings in Domain and ServiceDefaults projects.

CA1000 (3) — Static members on generic types (Result.cs)

Result<T> has static factory methods (Ok, Fail, OkOrFail). Move them to the non-generic Result class or suppress with justification if intentional design.

CA2225 (2) — Operator overloads without named alternates (Result.cs)

Implicit operators need named alternates (ToResult / FromT methods).

CA1062 (2) — Parameter null validation

  • ValidationBehavior.cs: validate next parameter is non-null
  • ServiceDefaults/Extensions.cs: validate app parameter is non-null in MapDefaultEndpoints

CA1307 (2) — Use StringComparison overload (ServiceDefaults/Extensions.cs lines 81-82)

Pass StringComparison.OrdinalIgnoreCase to StartsWithSegments calls.

CA1014 (4) — Assemblies not marked CLSCompliant

Add [assembly: CLSCompliant(false)] to AssemblyInfo files for Domain, ServiceDefaults, Web, and Domain.Tests.

Acceptance Criteria

  • All listed warnings resolved (or suppressed with documented justification)
  • Build and all tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    squad:samAssigned to Sam (Backend / .NET)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions