[settings]
lockfile = true
[tools]
rust = '1.95.0'
prettier = "latest"
actionlint = 'latest'
"cargo:cargo-nextest" = "latest"
"cargo:cargo-llvm-cov" = "0.8.6"
git-cliff = 'latest'
gh = 'latest'
[tasks.'changelog:skip-commit']
description = 'Add commit hash to .cliffignore to exclude from CHANGELOG'
usage = 'arg "<commit>" help="Git revision (e.g. HEAD or a1b2c4d)"'
run = 'git rev-parse --verify "${usage_commit}" >> .cliffignore'
[tasks.fmt]
description = 'Format all files'
depends = ['fmt:*']
[tasks.lint]
description = 'Run all linters'
depends = ['lint:*']
[tasks.test]
description = 'Run all tests'
depends = ['test:*']
[tasks.default]
description = 'Run all linters and tests'
depends = ['fmt', 'lint', 'test']
[tasks.ci]
description = 'Run all CI tasks'
depends = ['fmt', 'lint', 'test']
run = '! git status --porcelain | tee /dev/stderr | grep -q .'
[tasks.build]
description = 'Build release binary'
run = 'cargo build --release'
[tasks.'fmt:markdown']
description = 'Format markdown files'
run = 'prettier --write "**/*.md"'
[tasks.'fmt:rust']
description = 'Format Rust code'
run = 'cargo fmt --all'
[tasks.'lint:workflows']
description = 'Lint GitHub Action workflows'
run = 'actionlint'
[tasks.'lint:markdown']
description = 'Lint markdown files'
run = 'prettier --check "**/*.md"'
[tasks.'lint:rust']
description = 'Lint Rust code with clippy'
run = 'cargo clippy --workspace --all-targets -- -D warnings'
[tasks.'test:rust']
description = 'Run Rust tests'
wait_for = ['lint:*']
run = 'cargo nextest run --workspace --no-tests pass'
[tasks.'cover:rust']
description = 'Run Rust tests with LLVM coverage instrumentation'
run = 'cargo llvm-cov --workspace'
[tasks.'cover:rust:total']
description = 'Output total Rust coverage percentage'
run = "cargo llvm-cov report 2>/dev/null | awk '/^TOTAL/{print $10}'"