mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
enable/disable deprecated diagnostics in core instead of requiring each diagnostic provider do so
This commit is contained in:
@@ -127,6 +127,7 @@ export default class LanguageProvider extends Disposable {
|
||||
const reportUnnecessary = config.get<boolean>('showUnused', true);
|
||||
const reportDeprecated = config.get<boolean>('showDeprecated', true);
|
||||
this.client.diagnosticsManager.updateDiagnostics(file, this._diagnosticLanguage, diagnosticsKind, diagnostics.filter(diag => {
|
||||
// Don't both reporting diagnostics we know will not be rendered
|
||||
if (!reportUnnecessary) {
|
||||
if (diag.reportUnnecessary && diag.severity === vscode.DiagnosticSeverity.Hint) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user