Skip to content
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

Diagnostics are shown multiple times if multiple documents belonging to the same project are added #23

Closed
Vannevelj opened this issue Apr 28, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@Vannevelj
Copy link
Owner

Title says it all.

I have it figured out and the culprit is

foreach (var project in documents.Select(x => x.Project))
which does not take into account duplicated projects (e.g. documents belonging to the same project). I have confirmed this is the issue after I saw that the newest version of the helpers provided by Microsoft now use a HashSet<> prior to iterating. We can do the same or just add a Distinct() call after our Select().

@Vannevelj Vannevelj self-assigned this Apr 28, 2016
@Vannevelj Vannevelj added the bug label Apr 28, 2016
@Vannevelj Vannevelj added this to the 1.6.3 milestone May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant