/** * TestPlacementValidator - テスト配置検証 * * @description * テストファイルの配置が規約に従っているか検証し、 * 適切な配置を提案する。EXIT_GATE層でPhase 4完了時に検証。 * * @see DES-CODEGRAPH-001 - テスト配置検証システム * @see TSK-FR-048 - TestPlacementValidatorインターフェース定義 * @see TSK-FR-049 - validateFile/validateAll実装 * @see TSK-FR-050 - suggestPlacement実装 * @see TSK-FR-051 - QualityGate統合 * @trace REQ-FR-006 - テスト品質保証 */ import type { TestPlacement, PlacementRule, PlacementViolation, PlacementValidationResult, TestPlacementConfig } from '../types/TestPlacement.js'; /** * 検証統計 */ export interface ValidationStats { readonly totalValidations: number; readonly validCount: number; readonly warningCount: number; readonly invalidCount: number; readonly lastValidatedAt: number | null; } /** * TestPlacementValidatorインターフェース * * @trace DES-CODEGRAPH-001 */ export interface ITestPlacementValidator { /** * 単一テストファイルを検証 */ validateFile(testFilePath: string): Promise; /** * 複数テストファイルを検証 */ validateAll(testFilePaths: readonly string[]): Promise; /** * 配置提案を取得 */ suggestPlacement(testFilePath: string): Promise; /** * 特定ルールをチェック */ checkRule(testFilePath: string, ruleId: string): Promise; /** * ルール一覧を取得 */ getRules(): readonly PlacementRule[]; /** * ルールを追加 */ addRule(rule: PlacementRule): void; /** * ルールを有効化 */ enableRule(ruleId: string): void; /** * ルールを無効化 */ disableRule(ruleId: string): void; /** * 統計を取得 */ getStats(): ValidationStats; } /** * TestPlacementValidator実装 * * @trace DES-CODEGRAPH-001 */ export declare class TestPlacementValidator implements ITestPlacementValidator { private readonly rules; private readonly config; private stats; constructor(config?: TestPlacementConfig); /** * @trace TSK-FR-049 */ validateFile(testFilePath: string): Promise; /** * @trace TSK-FR-049 */ validateAll(testFilePaths: readonly string[]): Promise; /** * @trace TSK-FR-050 */ suggestPlacement(testFilePath: string): Promise; checkRule(testFilePath: string, ruleId: string): Promise; private checkRuleInternal; private matchesGlob; private matchesExpectedLocation; private generateSuggestedPath; getRules(): readonly PlacementRule[]; addRule(rule: PlacementRule): void; enableRule(ruleId: string): void; disableRule(ruleId: string): void; getStats(): ValidationStats; private updateStats; } /** * ファクトリ関数 * * @trace TSK-FR-048 */ export declare function createTestPlacementValidator(config?: TestPlacementConfig): ITestPlacementValidator; //# sourceMappingURL=TestPlacementValidator.d.ts.map