GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • --usage
  • Get started
  • Rust
  • Go (development preview)
  • Existing framework integrations
  • Spec
  • CLI
  • v7.4.1
  • Shell completions
  • Scripts
  • Markdown documentation
  • Man pages
  • TypeScript and Python SDKs
  • Compare specs

This view

  • Original page
  • New address

GeezerVison is showing usage.jdx.dev — usage lint | --usage

usage lint ​

  • Usage: usage lint [FLAGS] <FILE>
  • Effect: read-only
  • Source code: cli/src/cli/lint.rs

Lint a usage spec for mistakes that still parse

A spec can be valid KDL and still be wrong: a flag or subcommand declared twice, a required argument after an optional one, a variadic argument that is not last, a command or flag with no help, an example its own spec cannot parse. Each finding carries a code such as duplicate-flag, and --format json prints the findings as a list for a script to act on.

Exits 1 when there is an error, or a warning under --warnings-as-errors.

Arguments ​

  • <FILE> — A usage spec file, or a script with a usage shebang; "-" reads stdin

Flags ​

  • -f --format <FORMAT> — Output format

    Choices: text, json

    Default: text

  • -W --warnings-as-errors — Treat warnings as errors

  • --sorted — Also check that subcommands and flags are declared in sorted order

    Off by default: declaration order is a house convention rather than a correctness question, so a spec that keeps a different order is not wrong. Pair it with --warnings-as-errors to hold the order in CI.

  • -q --quiet — Print only the findings, not "No issues found." or the summary line

    Applies to the text format. The exit code and --format json are unchanged, so a loop over many specs prints nothing for the clean ones.

  • -h --help — Print help

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.