Skip to content

Commit

Permalink
remove redundant field
Browse files Browse the repository at this point in the history
  • Loading branch information
georgii-borovinskikh-sonarsource committed Dec 5, 2024
1 parent df7d79c commit dee887c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Integration.Vsix/SonarLintTagger/IssueConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ internal class IssueConsumer : IIssueConsumer
private readonly ITextSnapshot analysisSnapshot;
private readonly IAnalysisIssueVisualizationConverter issueToIssueVisualizationConverter;
private readonly string analysisFilePath;
private List<IAnalysisIssueVisualization> allIssues;
private readonly OnIssuesChanged onIssuesChanged;

public delegate void OnIssuesChanged(IEnumerable<IAnalysisIssueVisualization> issues);
Expand All @@ -73,8 +72,6 @@ public IssueConsumer(ITextSnapshot analysisSnapshot, string analysisFilePath, On
this.analysisFilePath = analysisFilePath ?? throw new ArgumentNullException(nameof(analysisFilePath));
this.onIssuesChanged = onIssuesChangedCallback ?? throw new ArgumentNullException(nameof(onIssuesChangedCallback));
this.issueToIssueVisualizationConverter = issueToIssueVisualizationConverter ?? throw new ArgumentNullException(nameof(issueToIssueVisualizationConverter));

allIssues = new List<IAnalysisIssueVisualization>();
}

public void Set(string path, IEnumerable<IAnalysisIssue> issues)
Expand All @@ -88,12 +85,10 @@ public void Set(string path, IEnumerable<IAnalysisIssue> issues)

Debug.Assert(issues.All(IsIssueFileLevelOrInAnalysisSnapshot), "Not all reported issues could be mapped to the analysis snapshot");

allIssues = issues
onIssuesChanged.Invoke(issues
.Where(IsIssueFileLevelOrInAnalysisSnapshot)
.Select(x => issueToIssueVisualizationConverter.Convert(x, analysisSnapshot))
.ToList();

onIssuesChanged.Invoke(allIssues);
.ToList());
}

/// <summary>
Expand Down

0 comments on commit dee887c

Please sign in to comment.