Path: blob/main/extensions/copilot/test/simulation/diagnosticProviders/diagnosticsProvider.ts
13395 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { ITestingServicesAccessor } from '../../../src/platform/test/node/services';67export interface IFile {8fileName: string;9fileContents: string;10}1112export abstract class DiagnosticsProvider {13abstract getDiagnostics(accessor: ITestingServicesAccessor, files: IFile[]): Promise<ITestDiagnostic[]>;1415protected isInstalled(): boolean { return true; }16}1718/**19* This is serialized in the cache.20*/21export interface ITestDiagnostic extends ITestDiagnosticLocation {22code: string | number | undefined;23message: string;24relatedInformation: ITSDiagnosticRelatedInformation[] | undefined;25source: string;26/**27* For typescript, this is used to differentiate between semantic and syntax errors.28*/29kind?: string;30}3132export interface ITestDiagnosticLocation {33file: string;34startLine: number;35startCharacter: number;36endLine: number;37endCharacter: number;38}3940export interface ITSDiagnosticRelatedInformation {41location: ITestDiagnosticLocation;42message: string;43code: number;44}454647