feat: implement core code review extension

This commit is contained in:
Developer
2026-07-14 21:18:19 +08:00
parent cafe67db6d
commit 1144c9b5db
39 changed files with 7541 additions and 132 deletions
+34
View File
@@ -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;
}