<!-- @generated by usage-cli from usage spec -->

# `usage lint`

- **Usage**: `usage lint [FLAGS] <FILE>`
- **Effect**: read-only
- **Source code**: [`cli/src/cli/lint.rs`](https://github.com/jdx/usage/blob/main/cli/src/cli/lint.rs)

Lint a usage spec file for common issues

## Arguments

### `<FILE>`

A usage spec file to lint, use "-" to read from 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.
