Files
vscode/extensions/copilot/test/simulation/diagnosticProviders/diagnosticsProvider.ts
T
kieferrm 333d9a4053 Hello Copilot
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-27 11:35:20 +02:00

46 lines
1.3 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ITestingServicesAccessor } from '../../../src/platform/test/node/services';
export interface IFile {
fileName: string;
fileContents: string;
}
export abstract class DiagnosticsProvider {
abstract getDiagnostics(accessor: ITestingServicesAccessor, files: IFile[]): Promise<ITestDiagnostic[]>;
protected isInstalled(): boolean { return true; }
}
/**
* This is serialized in the cache.
*/
export interface ITestDiagnostic extends ITestDiagnosticLocation {
code: string | number | undefined;
message: string;
relatedInformation: ITSDiagnosticRelatedInformation[] | undefined;
source: string;
/**
* For typescript, this is used to differentiate between semantic and syntax errors.
*/
kind?: string;
}
export interface ITestDiagnosticLocation {
file: string;
startLine: number;
startCharacter: number;
endLine: number;
endCharacter: number;
}
export interface ITSDiagnosticRelatedInformation {
location: ITestDiagnosticLocation;
message: string;
code: number;
}