提交 a87c7352 编写于 作者: M Matt Bierner

Remove extra work in DiagnosticSettings ctor

The langauges map is written so that it is lazy. We do not need to pre-populate it
上级 5b01e094
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册