Skip to content

refactor(lint-cli): lint.rs output-matrix ResultSink redesign #309

Description

@dean0x

Summary

Refactor the output-path architecture in lint.rs to consolidate the ResultSink trait — the pattern that makes --quiet structurally unbypassable and replaces 13 ad-hoc stdin-label sites.

This work unblocks five previously fixed defects (complexity-01, complexity-02, and three earlier wave fixes) and eliminates the prose contracts that complexity-12 tried to document.

Deferred Issues

From review [wave-v0.4.0-wave1/2026-08-19_1216]:

Finding File:Line Reason
complexity-04 crates/mds-cli/src/lint.rs B1 ResultSink refactor — rewrites every output path at a release gate.
complexity-12 crates/mds-cli/src/lint.rs:18 Prose PF-004 contract obsoleted by complexity-04.
performance-02 crates/mds-cli/src/lint.rs:1309 Touching sort key + display path together risks the just-declared ordering contract.
architecture-03 crates/mds-cli/src/lint.rs:770 Stdin-label funnel touches 5 files across every CLI output path.

Acceptance Criteria

  • ResultSink trait introduced as the output abstraction
  • All output paths (JSON, quiet, default) route through ResultSink
  • --quiet mode is unbypassable at the type level
  • Stdin labeling consolidated to a single codepath
  • All four defects resolved

Related

For v0.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions