Skip to content

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

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)#65
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 (#64) 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 28 flagged sites across ClaudeModelDiscoveryTests.cs, CodebaseExplorerE2ETests.cs, GherkinGeneratorE2ETests.cs, and PullRequestReviewerE2ETests.cs. 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 (all test projects, net8.0/net10.0) verified green locally with the analyzer bump applied.

Once merged, the Dependabot PR (#64) 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
Contributor

⚠️ 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
Contributor

Test Results

184 tests   175 ✅  1s ⏱️
  5 suites    9 💤
  5 files      0 ❌

Results for commit 59e1318.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 08/04/2026 - 04:08:04
  Coverage date: 08/04/2026 - 04:07:54 - 08/04/2026 - 04:08:02
  Parser: MultiReport (9x Cobertura)
  Assemblies: 1
  Classes: 10
  Files: 9
  Line coverage: 79%
  Covered lines: 230
  Uncovered lines: 61
  Coverable lines: 291
  Total lines: 913
  Branch coverage: 67.2% (78 of 116)
  Covered branches: 78
  Total branches: 116
  Method coverage: 89.5% (43 of 48)
  Full method coverage: 81.2% (39 of 48)
  Covered methods: 43
  Fully covered methods: 39
  Total methods: 48

JD.SemanticKernel.Connectors.ClaudeCode                                    79%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeCredentialsFile       100%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeHttpClientFactory     100%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeOAuthCredentials      100%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeSessionException     33.3%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeSessionHttpHandler   95.2%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeSessionOptions        100%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeCodeSessionProvider        70%
  JD.SemanticKernel.Connectors.ClaudeCode.ClaudeModelDiscovery            100%
  JD.SemanticKernel.Connectors.ClaudeCode.KernelBuilderExtensions        93.7%
  JD.SemanticKernel.Connectors.ClaudeCode.ServiceCollectionExtensions     100%

@JerrettDavis
JerrettDavis merged commit 76c9fc3 into main Aug 4, 2026
11 checks passed
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