-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addrange on immutableArray creates a new ImmutableArray #69331
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ public async Task<FirstFixResult> GetMostSevereFixAsync( | |
} | ||
|
||
var buildOnlyDiagnosticsService = document.Project.Solution.Services.GetRequiredService<IBuildOnlyDiagnosticsService>(); | ||
allDiagnostics.AddRange(buildOnlyDiagnosticsService.GetBuildOnlyDiagnostics(document.Id)); | ||
allDiagnostics = allDiagnostics.AddRange(buildOnlyDiagnosticsService.GetBuildOnlyDiagnostics(document.Id)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jasonmalinowski dotnet/runtime#34098 tracks adding such an analyzer driven by a new attribute in the framework. This is supposed to be lot more refined than all our existing analyzers in same space (IDE0058, IDE0059, etc.). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that we did have CA1806 which used to fire for the Collections.Immutable methods, but the
No, dotnet/runtime#34098 has been pushed out of .NET 8. cc @jeffhandley There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the interim, it might make sense to modify CA1806 to explicitly include items we know have return values that shouldn't be dropped. |
||
|
||
var text = await document.GetValueTextAsync(cancellationToken).ConfigureAwait(false); | ||
var spanToDiagnostics = ConvertToMap(text, allDiagnostics); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add a unit test or an integration test for this.