# Run, development mode
[tasks.dev]
run = "cargo run"

# Generate JSON schema for plz.toml
[tasks.genschema]
run = "cargo run -- plz schema > schema/plz.schema.json"

# Build, development mode
[tasks.build]
run = "cargo build && plz genschema"

# Build, release mode
[tasks.release]
run = "cargo build --release && plz genschema"

# Run tests
[tasks.test]
run = "plz genschema && cargo test"
git_hook = "pre-push"

# Run linting
[tasks.lint]
fail_hook = { suggest_command = "cargo clippy --fix --allow-dirty" }

# Check formatting
[tasks.format]
run = "cargo fmt --check"
fail_hook = { suggest_command = "cargo fmt" }

# Check linting and formating
[tasks.check]
run_parallel = ["plz format", "plz lint"]
git_hook = "pre-commit"

# Install locally
[tasks.install]
run_serial = ["cargo install --path . --force", "plz hooks install"]
