ctl-core 0.6.11

Shared clap chassis for the *ctl CLIs
Documentation
# Loaded when MISE_ENV contains `dev` (local default via .miserc.toml).
# Compile this checkout. Not used by Version PR.

# The latest stable mise is the floor; CI pins the same version.
min_version = "2026.10.3"

[tools]
"github:crate-ci/committed" = "1.1.11"
lefthook = "2.1.10"
rust = { version = "nightly-2026-09-29", components = "rustfmt,clippy", mr_boxington = true }
mr-boxington = "1.20.0"
"github:EmbarkStudios/cargo-deny" = "0.20.2"
"github:bnjbvr/cargo-machete" = "0.9.2"

# mise sets RUSTUP_TOOLCHAIN; without it, rustc resolves rust-toolchain.toml.
[tasks."check:toolchain"]
description = "mise.dev.toml and rust-toolchain.toml pin the same toolchain"
run = '[ "$(rustc -V)" = "$(env -u RUSTUP_TOOLCHAIN RUSTUP_AUTO_INSTALL=0 rustc -V)" ] || { echo "✘ mise.dev.toml and rust-toolchain.toml pin different toolchains"; exit 1; }'

[tasks.format]
description = "rustfmt check"
run = "cargo fmt --all -- --check"

[tasks.lint]
description = "clippy -D warnings"
run = "cargo clippy --all-targets --all-features -- -D warnings"

[tasks."check:features"]
description = "Compile each advertised feature set without extra features"
run = [
  "cargo check --no-default-features",
  "cargo check --no-default-features --features document",
  "cargo check --no-default-features --features render",
  "cargo check --no-default-features --features surface-model",
  "cargo check --no-default-features --features surface-serde",
  "cargo check --no-default-features --features surface-templates",
  "cargo check --no-default-features --features surface",
  "cargo check --no-default-features --features validate",
  "cargo check --no-default-features --features input",
  "cargo check --no-default-features --features fixture",
  "cargo check --no-default-features --features served",
  "cargo check --no-default-features --features usage",
  "cargo check --no-default-features --features json",
  "cargo check --no-default-features --features cli",
  "cargo check --no-default-features --features view",
  "cargo check --no-default-features --features help",
  "cargo check --no-default-features --features app",
  "cargo check --no-default-features --features app,usage",
  "cargo check --no-default-features --features schema",
]

[tasks.test]
description = "Unit, integration, and doc-tests"
run = "cargo test --all-features"
# Stops a hung test run instead of holding the gate. The limit also counts
# compile time and waits on the target/ lock, so it sits far above a cold build.
timeout = "30m"

[tasks.deny]
description = "License, ban, and source policy (offline)"
run = "cargo deny check licenses bans sources"

[tasks."deny:advisories"]
description = "RustSec advisories and yanked crates (network)"
run = "cargo deny check advisories"

[tasks.deps]
description = "Unused crate analysis"
run = "cargo-machete --with-metadata"

[tasks.commit-msg]
description = "Lint the git commit-msg file with committed"
usage = 'arg "<file>" help="Path to the commit message file"'
run = 'committed --commit-file "${usage_file}"'

[tasks.commits]
description = "Lint commit messages with committed"
usage = 'arg "[commits]" default="HEAD" help="Commit or range"'
run = 'committed "${usage_commits}"'

[tasks.verify]
description = "Toolchain pins, format, lint, feature sets, tests, deny, unused crates"
depends = ["check:toolchain", "format", "lint", "check:features", "test", "deny", "deps"]