Skip to content

feat: -f/--format flag with strict msgpack rejection #30

Description

@rahlk

Type: feat · Branch: feat/issue-30-format-flag · Part of epic #26

Problem

The CLI contract lists -f/--format and mandates a non-zero error on the unimplemented msgpack value rather than a silent fallback (cli-contract.md:12,44-58). No such flag exists (src/cli.ts, src/options/options.ts), so the facade can neither pass a default -f json uniformly nor get a clean msgpack rejection.

Change

Add -f, --format <json|msgpack> (default json), mirroring the strict-validation pattern already at src/cli.ts:78-99; msgpack/unknown → non-zero error (error: msgpack output is not yet implemented; use --format json). Add format to AnalysisOptions (default "json").

Acceptance

  • --format msgpack (and any unknown value) exits non-zero; --format json and omission succeed.
  • Covered in the flag-validation suite (pattern: test/dataflow.test.ts:396-425).

Files: src/cli.ts, src/options/options.ts, flag-validation test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions