Harden analyzer precision and code-fix safety - #11
Merged
Conversation
Only offer code fixes when the rewrite is structurally safe, and add regression coverage for code actions that must not appear.\n\nCo-authored-by: Codex <noreply@openai.com>
Stop warning on scoped-to-transient injections, align the documentation, and update DI003 code-fix expectations to match the higher-confidence rule scope.\n\nCo-authored-by: Codex <noreply@openai.com>
Recognize root providers assigned to members and later disposed in Dispose or DisposeAsync, including null-conditional dispose patterns, while keeping looser cleanup paths diagnostic.\n\nCo-authored-by: Codex <noreply@openai.com>
Allow hosted services and endpoint filter factories to inject service-provider abstractions without diagnostics, while preserving reports for ordinary application services.\n\nCo-authored-by: Codex <noreply@openai.com>
Extract the requested type from typeof(...) service-locator calls so DI007 reports the actual dependency instead of falling back to Object, and add regression coverage for the non-generic paths.\n\nCo-authored-by: Codex <noreply@openai.com>
Update DI011 documentation and sample warning counts to match current analyzer behavior, and pass dependency lifetimes through DI003 and DI009 diagnostics so their fixers stop parsing localized message text.\n\nCo-authored-by: Codex <noreply@openai.com>
Only offer the DI006 remove-static fix when the cached provider is not referenced from static contexts, and add regression coverage for static call sites that would otherwise be broken by the rewrite.\n\nCo-authored-by: Codex <noreply@openai.com>
Contributor
SummarySummary
CoverageDependencyInjection.Lifetime.Analyzers - 85.7%
|
This was referenced Mar 16, 2026
This was referenced Mar 27, 2026
This was referenced Apr 7, 2026
This was referenced Apr 14, 2026
This was referenced Apr 21, 2026
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.
Summary
Verification