Port DisposeAnalyzers to release/dev16.2-preview2#36112
Merged
mavasani merged 8 commits intodotnet:release/dev16.2-preview2from Jun 2, 2019
Merged
Port DisposeAnalyzers to release/dev16.2-preview2#36112mavasani merged 8 commits intodotnet:release/dev16.2-preview2from
mavasani merged 8 commits intodotnet:release/dev16.2-preview2from
Conversation
(DisposableFieldsShouldBeDisposed) We will now flag disposable creations in methods that do not escape the method body (return value, out/ref params, assign to field/property, add to collection, etc.). Additionally, we also flag disposable fields of disposable types that are not disposed in the type's Dispose method. Ported analyzers share the core dataflow analysis computation with the analyzers in the roslyn-analyzers repo (Microsoft.CodeAnalysis.FlowAnalysis.Utilities). This PR does not add any code fixes. We already have a code refactoring that offers wrapping a disposable creation within a using statement. I am hoping to extend that to handle more cases and also possibly convert it to a code fix in follow-up PR(s).
… assembly load lazy and revert reference add to the FlowAnalysis assembly in Workspaces (only referenced in Features now).
Additionally, we do not mark the package reference to in Features.csproj as PrivateAsset as this leads to the assembly not getting included in the Features NuGet package and causes Omnisharp's analyzer execution to throw missing dependency assembly load errors. Also update ExpectedDependency in DevDivInsertionFiles.csproj
jinujoseph
approved these changes
Jun 2, 2019
agocke
added a commit
to agocke/roslyn
that referenced
this pull request
Jun 21, 2019
agocke
added a commit
that referenced
this pull request
Jun 24, 2019
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.
Ports the following PRs from master to release/dev16.2-preview2: