Skip to content

Commit

Permalink
Merge branch 'master' into update-build-tools5
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich authored Jan 25, 2022
2 parents 802cf07 + d10ba5b commit 098f60f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public async Task<ImmutableArray<DocumentDiagnostics>> GetDiagnostics(ImmutableA
{
if (!documentPaths.Any()) return ImmutableArray<DocumentDiagnostics>.Empty;

var results = new List<DocumentDiagnostics>();
var results = ImmutableList<DocumentDiagnostics>.Empty;

var documents =
(await Task.WhenAll(
Expand All @@ -164,7 +164,8 @@ public async Task<ImmutableArray<DocumentDiagnostics>> GetDiagnostics(ImmutableA
try
{
var diagnostics = await GetDiagnosticsForDocument(document, projectName);
results.Add(new DocumentDiagnostics(document.Id, document.FilePath, document.Project.Id, document.Project.Name, diagnostics));
var documentDiagnostics = new DocumentDiagnostics(document.Id, document.FilePath, document.Project.Id, document.Project.Name, diagnostics);
ImmutableInterlocked.Update(ref results, currentResults => currentResults.Add(documentDiagnostics));
}
finally
{
Expand Down

0 comments on commit 098f60f

Please sign in to comment.