Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Split up the DiagnosticCollections per tool type - #2109

Merged
Ramya Rao (ramya-rao-a) merged 6 commits into
microsoft:masterfrom
segevfiner:rearrange-diagnostic-collections
Nov 13, 2018
Merged

Split up the DiagnosticCollections per tool type #2109
Ramya Rao (ramya-rao-a) merged 6 commits into
microsoft:masterfrom
segevfiner:rearrange-diagnostic-collections

Conversation

@segevfiner

Copy link
Copy Markdown
Contributor

This code seems quite sensitive, this needs a careful review & some testing. Please pay extra attention to the diagnostic de-duping code in handleDiagnosticErrors.

Fixes #2100, fixes #2101

@ramya-rao-a Ramya Rao (ramya-rao-a) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good Segev Finer (@segevfiner)

I have pushed a commit to refactor the de-dupe logic in handleDiagnosticErrors, do take a look.

@segevfiner Segev Finer (segevfiner) left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have pushed a commit to refactor the de-dupe logic in handleDiagnosticErrors, do take a look.

I actually thought about doing that myself when touching that code. 😊 Seems to be working fine.

Comment thread src/util.ts
});
}

function deDupeDiagnostics(buildDiagnostics: vscode.Diagnostic[], otherDiagnostics: vscode.Diagnostic[]): vscode.Diagnostic[] {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is really more generic than just for the buildDiagnostics. Might be a bit hard to come up with good "generic" names for the parameters though 😛

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Diagnostic.source for generated diagnostics Duplicate diagnostics when running a task with the $go problemMatcher

2 participants