feat(format): add check and fix workflows

This commit is contained in:
2026-05-14 13:18:49 +00:00
parent 6f0928e7c7
commit 278df40ba7
11 changed files with 635 additions and 250 deletions
+13 -1
View File
@@ -1,6 +1,10 @@
import * as plugins from './mod.plugins.js';
import { FormatContext } from './classes.formatcontext.js';
import type { IPlannedChange, ICheckResult } from './interfaces.format.js';
import type {
IPlannedChange,
ICheckResult,
IFormatWarning,
} from './interfaces.format.js';
import { Project } from '../classes.project.js';
import { FormatStats } from './classes.formatstats.js';
@@ -19,6 +23,14 @@ export abstract class BaseFormatter {
abstract analyze(): Promise<IPlannedChange[]>;
abstract applyChange(change: IPlannedChange): Promise<void>;
get runsWithoutChanges(): boolean {
return false;
}
async validate(): Promise<IFormatWarning[]> {
return [];
}
async execute(changes: IPlannedChange[]): Promise<void> {
const startTime = this.stats.moduleStartTime(this.name);
this.stats.startModule(this.name);