Single migration-drift finding emitted by scanFile.

The shape carries everything a downstream dashboard or pre-commit gate needs to render an actionable diagnostic: the catalogue-stable ruleId, the file/line/column triple, the matched source token, and the human-facing suggestion that points to the corresponding RULE_CATALOGUE.md row. severity drives the CLI exit code via severityToExitCode.

interface DriftFinding {
    category: DriftCategory;
    column: number;
    file: string;
    line: number;
    ruleId: RuleId;
    severity: Severity;
    suggestion: string;
    token: string;
}

Properties

category: DriftCategory

Coarse category for back-compat dashboards.

column: number
file: string
line: number
ruleId: RuleId

Stable rule ID from docs/migration/RULE_CATALOGUE.md.

severity: Severity

Catalogue severity — drives CLI exit code.

suggestion: string

Suggested migration: which docs page, which pattern.

token: string

A short token from the source — the import name, hook name, etc.