in src/provider/linter.ts [74:98]
export async function updateDiagnostics(
document: vscode.TextDocument,
collection: vscode.DiagnosticCollection,
): Promise<void> {
if ((fileSel as any)?.find((sel) => sel.language === document.languageId)) {
const text = document.getText();
let diagnosticCollection: vscode.Diagnostic[] = [];
let errors = [];
errors = searchCode(diagnosticCollection, LintRules[0], text, document);
if (errors?.length) {
searchCode(diagnosticCollection, LintRules[1], text, document);
}
// LintRules.forEach((rule) => {
// searchCode(diagnosticCollection, rule, text, document);
// });
collection.set(document.uri, diagnosticCollection);
} else {
collection.clear();
}
}