Absolute or relative path to the directory to scan. Used
as the base for the relative path stored on each finding.
Optional ScanOptions overriding the default extension set and skip list.
A DriftReport carrying the union of every per-file
finding plus the aggregated byCategory / byRuleId / bySeverity
counts and the filesScanned total.
Each file is read once and dispatched through scanFile so the
rule catalogue stays the single source of truth. Symbolic links are
not followed beyond what fs.readdir returns; the entry-name match
against ScanOptions.skip is exact-segment-based, so a skip of
dist prunes dist/ but never distribution/ or distance.ts.
Recursively scan a directory tree for migration drift.