-
Notifications
You must be signed in to change notification settings - Fork 39k
Test: Links for diagnostics #89320
Copy link
Copy link
Closed
Labels
Milestone
Description
Refs: #11847
- macOS @sbatten
- linux @RMacfarlane
- windows @alexr00
Complexity: 3
We proposed an API to add link to diagnostics:
export interface Diagnostic {
/**
* Will be merged into `Diagnostic#code`
*/
code2?: {
/**
* A code or identifier for this diagnostic.
* Should be used for later processing, e.g. when providing [code actions](#CodeActionContext).
*/
value: string | number;
/**
* A link to a URI with more information about the diagnostic error.
*/
link: Uri;
}
}The link is rendered in hover, inline error (F8) and problems panel.
You should be able to single-click to open links to hover and inline error, and cmd/alt click to open links in problems panel. We do this so you can still single click any region in problems panel to go to the errors in editor.
Write an extension that uses this proposed API, test that:
- The API and its description all makes sense
- The rendering / behavior or these links are consistent and make sense
- The links are colored like other links, and themed accordingly
- The links are protected by the link protection mechanism
Setup:
- You can use https://github.com/microsoft/vscode-extension-samples/tree/master/proposed-api-sample as a starting point
- Some sample code to get you started is in here: Ability to add links to diagnostics and render them as links in problems view #11847 (comment)
Reactions are currently unavailable