Skip to content

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

Closed as not planned

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.

Activity

  1. rahlk commented on Jul 7, 2026

    @rahlk
    ContributorAuthor

    Dropped per maintainer decision: msgpack output has no consumers, and json is already the sole/default output — so a -f/--format flag (which existed only to expose json|msgpack and reject the unimplemented msgpack) is vestigial. The commit was rebased out of the stack; PR #39 (#31) now bases directly on #29 (#28).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions