Skip to content

fix(analyzers): fix three code fix and analyzer defects, bump to 3.1.4 - #177

Merged
e128 merged 1 commit into
mainfrom
ai-sdlc-readier/setup
Nov 17, 2026
Merged

e128 merged 1 commit into
mainfrom
ai-sdlc-readier/setup

Conversation

@e128

@e128 e128 commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Executive Summary

A coverage pass over five code fix providers and one analyzer found three reproduced defects. Each failed a new test before its fix and passes after.

  • E128075: IsShadowedBySourceType bound an IMethodSymbol, so the ITypeSymbol check never fired. A source type named RandomNumberGenerator did not block the fix.
  • E128029: GetComparerExpression mapped any spelling without the StringComparison. prefix to StringComparer.Ordinal. System.StringComparison.OrdinalIgnoreCase lost its ignore-case meaning.
  • E128012: RegexOptions.Compiled inside parentheses was not reported, and the fix did not handle that shape.

The package version moves from 3.1.3 to 3.1.4.

Code Changes

  • InsecureRandomInCryptoContextCodeFixProvider: bind the RandomNumberGenerator type name for the shadow check.
  • MultiStringEqualsOrChainCodeFixProvider: map StringComparison.X, System.StringComparison.X, and global::System.StringComparison.X to StringComparer.X. Any other text offers no fix.
  • GeneratedRegexAnalyzer unwraps parentheses. GeneratedRegexCompiledCodeFixProvider removes Compiled inside them and drops parentheses that wrap one option.
  • E128.Analyzers.csproj and the README install snippet: version 3.1.4. No rule rows changed, so AnalyzerReleases.Unshipped.md stays empty.
  • Seven lode/ files: stale claims corrected against the tree.

Tests and Tooling

  • Added 3 test files with 11 cases: InsecureRandomInCryptoContextOuterShadowTests, MultiStringEqualsOrChainComparerSpellingTests, GeneratedRegexCompiledParenthesizedTests. Controls aside, all failed before the fixes.
  • scripts/check.sh --all passed: shell lint, analyzer release check, format, build, tests. scripts/test.sh --all ran 5796 tests: 5794 passed, 0 failed, 2 skipped (Podman smoke tests, Podman not installed).
  • 14 architecture tests passed.
  • Package branch coverage was 90.72% before these tests. It was not remeasured.
  • No benchmark ran.

Review Guide

  • The fixes are small. Start with the GetComparerExpression mapping, since it changes which expressions get a fix.
  • lode/summary.md keeps one long-sentence style hit on a line this change did not touch.

Rollback

Revert the squash commit. No data or configuration migration is involved.

Fix E128075 shadow check so a source type named RandomNumberGenerator
blocks the fix. Fix E128029 comparer mapping so StringComparison spellings
keep their comparison and unknown expressions offer no fix. Fix E128012 to
see Compiled inside parentheses, and make its fix remove it there.

Add 11 regression test cases. Refresh seven Lode files against the tree.
@e128
e128 merged commit 3cf69ac into main Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant