/** * Per-path source LOC budget evaluation. * * Extends the single-ceiling `entry_loc` constraint model (see validator.ts) * with per-path budgets carrying independent warn/fail ceilings, so teams can * catch god-object drift across arbitrary runtime source files — not just the * one entry file. Pure core: callers supply already-measured line counts; this * module does matching + status resolution only (no filesystem access). */ import type { ConstraintStatus, LocBudgetRule, LocBudgetResult } from './types'; /** * Resolve a budget status for a measured line count against warn/fail ceilings. * * Mirrors validator.ts `resolveStatus` semantics (a value strictly *exceeding* * a ceiling breaches it), generalized to two ceilings: * - lines > fail → fail * - lines > warn → warn * - otherwise → pass * * A null ceiling is treated as "unset" (never breached at that level). */ export declare function resolveBudgetStatus(lines: number, warn: number | null, fail: number | null): ConstraintStatus; /** * Match a repo-relative file path against a glob pattern. * * Minimal, dependency-free glob: `**` matches across path segments (including * none), `*` matches within a single segment, everything else is literal. * Backslashes are normalized to `/` so Windows paths match POSIX patterns. */ export declare function matchPath(filePath: string, pattern: string): boolean; /** * Evaluate measured files against an ordered list of LOC budget rules. * * Each file is matched against the rules in order; the FIRST matching rule * applies (so list more specific patterns first). Files matching no rule are * omitted from the results. Per-rule ceilings fall back to the supplied * defaults when unset. * * @param files Measured files (repo-relative path + line count). * @param rules Ordered budget rules. * @param defaults Optional default warn/fail ceilings applied when a rule omits one. */ export declare function evaluateLocBudgets(files: Array<{ path: string; lines: number; }>, rules: LocBudgetRule[], defaults?: { warn?: number; fail?: number; }): LocBudgetResult[]; //# sourceMappingURL=loc-budget.d.ts.map