feat: implement core code review extension
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export interface CustomRule {
|
||||
id: string;
|
||||
severity: Severity;
|
||||
description: string;
|
||||
message: string;
|
||||
languages?: string[];
|
||||
}
|
||||
|
||||
export type Severity = 'error' | 'warning' | 'info';
|
||||
|
||||
export type AdapterStatus = 'ok' | 'tool-unavailable' | 'execution-failed';
|
||||
|
||||
export interface LinterDiagnostic {
|
||||
severity: Severity;
|
||||
ruleId: string;
|
||||
message: string;
|
||||
range: vscode.Range;
|
||||
suggestion?: string;
|
||||
}
|
||||
|
||||
export interface AdapterResult {
|
||||
diagnostics: LinterDiagnostic[];
|
||||
status: AdapterStatus;
|
||||
errorMessage?: string;
|
||||
}
|
||||
|
||||
export interface LinterAdapter {
|
||||
id: string;
|
||||
supportedLanguages: string[];
|
||||
check(document: vscode.TextDocument, workingDir: string): Promise<AdapterResult>;
|
||||
isAvailable(): boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user