mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
Clean up markdown diagnostic tests (#152374)
* Clean up markdown diagnostic tests This splits the diagnostic compute tests from the test for the diagnostic manager * Mark internal field as private
This commit is contained in:
@@ -367,7 +367,7 @@ export class DiagnosticManager extends Disposable {
|
||||
this.pendingDiagnostics.clear();
|
||||
}
|
||||
|
||||
public async recomputeDiagnosticState(doc: SkinnyTextDocument, token: vscode.CancellationToken): Promise<{ diagnostics: readonly vscode.Diagnostic[]; links: readonly MdLink[]; config: DiagnosticOptions }> {
|
||||
private async recomputeDiagnosticState(doc: SkinnyTextDocument, token: vscode.CancellationToken): Promise<{ diagnostics: readonly vscode.Diagnostic[]; links: readonly MdLink[]; config: DiagnosticOptions }> {
|
||||
const config = this.configuration.getOptions(doc.uri);
|
||||
if (!config.enabled) {
|
||||
return { diagnostics: [], links: [], config };
|
||||
@@ -456,7 +456,7 @@ export class DiagnosticComputer {
|
||||
|
||||
public async getDiagnostics(doc: SkinnyTextDocument, options: DiagnosticOptions, token: vscode.CancellationToken): Promise<{ readonly diagnostics: vscode.Diagnostic[]; readonly links: MdLink[] }> {
|
||||
const links = await this.linkComputer.getAllLinks(doc, token);
|
||||
if (token.isCancellationRequested) {
|
||||
if (token.isCancellationRequested || !options.enabled) {
|
||||
return { links, diagnostics: [] };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user