Repository navigation
fix(analyzers): fix three code fix and analyzer defects, bump to 3.1.4 - #177
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
IsShadowedBySourceTypebound anIMethodSymbol, so theITypeSymbolcheck never fired. A source type namedRandomNumberGeneratordid not block the fix.GetComparerExpressionmapped any spelling without theStringComparison.prefix toStringComparer.Ordinal.System.StringComparison.OrdinalIgnoreCaselost its ignore-case meaning.RegexOptions.Compiledinside 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 theRandomNumberGeneratortype name for the shadow check.MultiStringEqualsOrChainCodeFixProvider: mapStringComparison.X,System.StringComparison.X, andglobal::System.StringComparison.XtoStringComparer.X. Any other text offers no fix.GeneratedRegexAnalyzerunwraps parentheses.GeneratedRegexCompiledCodeFixProviderremovesCompiledinside them and drops parentheses that wrap one option.E128.Analyzers.csprojand the README install snippet: version 3.1.4. No rule rows changed, soAnalyzerReleases.Unshipped.mdstays empty.lode/files: stale claims corrected against the tree.Tests and Tooling
InsecureRandomInCryptoContextOuterShadowTests,MultiStringEqualsOrChainComparerSpellingTests,GeneratedRegexCompiledParenthesizedTests. Controls aside, all failed before the fixes.scripts/check.sh --allpassed: shell lint, analyzer release check, format, build, tests.scripts/test.sh --allran 5796 tests: 5794 passed, 0 failed, 2 skipped (Podman smoke tests, Podman not installed).Review Guide
GetComparerExpressionmapping, since it changes which expressions get a fix.lode/summary.mdkeeps 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.