Skip to content

fix: add explicit StringComparison.Ordinal for MA0002 (Meziantou.Analyzer 3.0.138) - #70

Merged
JerrettDavis merged 1 commit into
mainfrom
fix/ma0002-ordinal
Aug 4, 2026
Merged

fix: add explicit StringComparison.Ordinal for MA0002 (Meziantou.Analyzer 3.0.138)#70
JerrettDavis merged 1 commit into
mainfrom
fix/ma0002-ordinal

Conversation

@JerrettDavis

Copy link
Copy Markdown
Owner

Dependabot's Meziantou.Analyzer 3.0.125 -> 3.0.138 bump (#69) enables MA0002 for Assert.Contains<string> collection-membership calls without an IEqualityComparer<string> parameter, which breaks the analyzers-as-errors build on this pre-existing test code.

Fix: add StringComparer.Ordinal explicitly at the two flagged sites in CopilotSessionHttpHandlerTests.cs (lines 57 and 70). The default equality comparer for these string collection checks is already ordinal, so this preserves existing behavior exactly and does not change any test outcome.

No production/src code touched. Build and full test suite (net8.0/net10.0) verified green locally with the analyzer bump applied.

Once merged, the Dependabot PR (#69) can rebase and go green.

Meziantou.Analyzer 3.0.138 (bumped via Dependabot) enforces MA0002 for
Assert.Contains<string> calls without an IEqualityComparer<string>
parameter. StringComparer.Ordinal preserves the existing (default)
equality behavior exactly, so test outcomes are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Code Coverage

Summary
  Generated on: 08/04/2026 - 03:51:24
  Coverage date: 08/04/2026 - 03:51:19 - 08/04/2026 - 03:51:21
  Parser: MultiReport (5x Cobertura)
  Assemblies: 2
  Classes: 14
  Files: 13
  Line coverage: 87.2%
  Covered lines: 225
  Uncovered lines: 33
  Coverable lines: 258
  Total lines: 880
  Branch coverage: 78.5% (77 of 98)
  Covered branches: 77
  Total branches: 98
  Method coverage: 98% (51 of 52)
  Full method coverage: 88.4% (46 of 52)
  Covered methods: 51
  Fully covered methods: 46
  Total methods: 52

JD.SemanticKernel.Connectors.Abstractions                                   100%
  JD.SemanticKernel.Connectors.Abstractions.ModelInfo                       100%
  JD.SemanticKernel.Connectors.Abstractions.SessionCredentials              100%
  JD.SemanticKernel.Connectors.Abstractions.SessionOptionsBase              100%

JD.SemanticKernel.Connectors.GitHubCopilot                                 86.9%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotHttpClientFactory       100%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotModelDiscovery          100%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotSessionException        100%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotSessionHttpHandler      100%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotSessionOptions          100%
  JD.SemanticKernel.Connectors.GitHubCopilot.CopilotSessionProvider        75.9%
  JD.SemanticKernel.Connectors.GitHubCopilot.KernelBuilderExtensions        100%
  JD.SemanticKernel.Connectors.GitHubCopilot.Models.CopilotAppsEntry       66.6%
  JD.SemanticKernel.Connectors.GitHubCopilot.Models.CopilotEndpoints        100%
  JD.SemanticKernel.Connectors.GitHubCopilot.Models.CopilotTokenResponse    100%
  JD.SemanticKernel.Connectors.GitHubCopilot.ServiceCollectionExtensions    100%

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Test Results

101 tests   92 ✅  0s ⏱️
  3 suites   9 💤
  3 files     0 ❌

Results for commit 2dc874e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant