mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
Remove extra work in DiagnosticSettings ctor
The langauges map is written so that it is lazy. We do not need to pre-populate it
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { ResourceMap } from '../utils/resourceMap';
|
||||
import { DiagnosticLanguage, allDiagnosticLanguages } from '../utils/languageDescription';
|
||||
import { DiagnosticLanguage } from '../utils/languageDescription';
|
||||
import * as arrays from '../utils/arrays';
|
||||
|
||||
function diagnosticsEquals(a: vscode.Diagnostic, b: vscode.Diagnostic): boolean {
|
||||
@@ -101,12 +101,6 @@ class DiagnosticSettings {
|
||||
|
||||
private readonly _languageSettings = new Map<DiagnosticLanguage, LanguageDiagnosticSettings>();
|
||||
|
||||
constructor() {
|
||||
for (const language of allDiagnosticLanguages) {
|
||||
this._languageSettings.set(language, DiagnosticSettings.defaultSettings);
|
||||
}
|
||||
}
|
||||
|
||||
public getValidate(language: DiagnosticLanguage): boolean {
|
||||
return this.get(language).validate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user