Skip to content

Refactor mds lint CLI per-file dispatch spine #173

Description

@dean0x

Location: crates/mds-cli/src/lint.rs:738,822

lint_one_file_accumulating and lint_one_file_human are ~80-line near-identical twins; the FixFileOutcome match repeats in run_lint_file (~555) and run_lint_stdin (~462). Need behavior-preserving process_one_file spine + emit sink refactor.

Deferred From: PR #171 (Closes #61) — mds lint release gate
Review: .devflow/docs/reviews/feat-mds-lint-61/2026-07-11_1046/resolution-summary.md

Reason for Deferral:
Regression risk on the JSON/human exit paths under the v0.4.0 release gate. CLI spine refactoring is best done post-release when testing has stabilized.

Acceptance Criteria:

  • Extract common process_one_file(path, mode) -> FixFileOutcome helper
  • Reduce duplication in FixFileOutcome match handling
  • Maintain behavior on JSON/human output paths
  • All 590+ Rust tests + cli_lint.rs suite pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions