Skip to content

docs: add global flag, environment, and configuration references - #28

Open
thebrandonlucas wants to merge 1 commit into
feat/cli-help-examplesfrom
docs/cli-reference
Open

thebrandonlucas wants to merge 1 commit into
feat/cli-help-examplesfrom
docs/cli-reference

Conversation

@thebrandonlucas

Copy link
Copy Markdown
Contributor

Stack: master ← #20 ← #22 ← #24 ← #19 ← #26 ← #27 ← this PR. Plan 07, phase 4 (reference).

Page Source Kept true by
docs/reference/global-flags.md Rendered from GlobalFlags A golden test; VOLTAGE_BLESS=1 cargo test regenerates it
docs/reference/environment.md Hand-written: every VOLTAGE_* variable, XDG_CONFIG_HOME, COLUMNS, and the flag that beats each A test that every VOLTAGE_* literal in src/ is listed
docs/reference/configuration.md Hand-written: the configuration directory, config.toml, credential stores, the lock, the request journal The relative-link and anchor check
docs/reference/exit-codes.md Existing A test that every ErrorKind code is listed; an exhaustive match makes a new kind fail to compile until it is added

The docs index links the new pages, and the development guide explains VOLTAGE_BLESS.

Not in this PR: a help-rendered command reference. Rendering --help for all 60 commands would exceed the 1,000-line limit on its own; --help now carries examples and a guide link (#27), and docs/commands.md keeps the generated route table.

Validation: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata, cargo test --locked (97 unit, 69 integration), and python3 scripts/check-coverage.py.

docs/reference/global-flags.md is rendered from GlobalFlags by a test:
plain cargo test fails when it is stale, and VOLTAGE_BLESS=1 cargo test
rewrites it. New hand-written pages cover every environment variable with
the flag that beats it, and the configuration directory, credential stores,
and request journal.

Parity tests require every VOLTAGE_* variable read in src/ to appear in the
environment reference, and every exit code in the exit code reference; the
exit code list is checked by an exhaustive match, so a new ErrorKind fails
to compile until it is listed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant