Skip to content

validate: add -q, --quiet to suppress output and rely on exit code #93

Description

@char0n

Deferred from #92 (validate command first cut).

Summary

Add a -q, --quiet flag to speclynx validate that suppresses all diagnostic output and communicates the result purely through the exit code.

Motivation

In CI gating, callers often only care whether validation passed or failed, not the diagnostics themselves. --quiet lets them run speclynx validate spec.yaml -q and branch on $? without capturing/discarding stdout.

Proposed behavior

  • Suppress the formatted diagnostics on stdout (both stylish and json).
  • Still write hard errors (e.g. missing file) to stderr.
  • Exit code is unchanged: 1 when a diagnostic at or above --fail-severity is found, 0 otherwise.
  • Interaction with --format: --quiet wins (no formatter output is produced).

Notes

Kept out of the first cut to keep the initial option surface small. See #92 for the opinionated v1 option set.

Activity

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