export interface CheckError {
  type:
    | "missing-doc"
    | "orphaned-doc"
    | "missing-test-case"
    | "extra-test-case"
    | "missing-test-file"
    | "orphaned-spec"
    | "missing-actor-doc"
    | "missing-actor-fixture"
    | "missing-page-object"
    | "missing-spec-fixture";
  category: string;
  sourcePath?: string;
  docPath?: string;
  expectedBasename: string;
}

export interface SyncCheckResult {
  errors: CheckError[];
  filesChecked: number;
}

export function emptyResult(): SyncCheckResult {
  return { errors: [], filesChecked: 0 };
}

export function mergeResults(into: SyncCheckResult, other: SyncCheckResult): void {
  into.errors.push(...other.errors);
  into.filesChecked += other.filesChecked;
}

export interface CategoryConfig {
  name: string;
  sourcePattern: string;
  docPattern: string;
  exclusions: RegExp[];
}

export interface TestCaseCategoryConfig {
  name: string;
  docPattern: string;
  testDir: string;
}
