Check for a set instance only before an MA0002 report - #1622
Merged
meziantou merged 1 commit intoOct 3, 2026
Merged
Conversation
MA0002 ran a data flow analysis of the instance of every invocation, up to three times, to skip calls on sets. It now runs it once, only for a call it would report.
This was referenced Oct 3, 2026
This was referenced Oct 4, 2026
This was referenced Oct 5, 2026
Bump Meziantou.Analyzer from 3.0.139 to 3.0.294
Analogy-LogViewer/Analogy.AspNetCore.LogProvider#566
Open
Open
Open
Open
Open
Open
Open
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.
What
MA0002 skips calls on sets. To find out whether the instance is a set, it ran a data flow analysis of the instance of every invocation, up to three times. It now runs it once, and only for a call it would report.
Why
Meziantou.Analyzer time on one large test project: 11.6 s before, 6.4 s after.
Tests
Existing tests pass on Roslyn 5.9 and 4.8.