mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
parent
015ec8303c
commit
3c11a065e7
|
@ -156,10 +156,12 @@ export class DiagnosticsManager {
|
|||
}
|
||||
|
||||
private getSuggestionDiagnostics(file: vscode.Uri) {
|
||||
if (!this._enableSuggestions) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return this._diagnostics.get(DiagnosticKind.Suggestion)!.get(file);
|
||||
return this._diagnostics.get(DiagnosticKind.Suggestion)!.get(file).filter(x => {
|
||||
if (!this._enableSuggestions) {
|
||||
// Still show unused
|
||||
return x.customTags && x.customTags.indexOf(vscode.DiagnosticTag.Unnecessary) !== -1;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue