# Adapted from:
# https://github.com/Nullus157/async-compression/blob/main/justfile

_list:
    @just --list

# Format project.
fmt:
    just --unstable --fmt
    cargo +nightly fmt

# Check project.
[group("lint")]
check: clippy
    just --unstable --fmt --check
    cargo +nightly fmt -- --check

# Lint workspace with Clippy.
clippy:
    cargo clippy --workspace --all-targets --no-default-features
    cargo clippy --workspace --all-targets --all-features

# Document crates in workspace.
doc *args:
    RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --workspace --all-features {{ args }}

# Checks feature combinations for runtime.
check-features async_runtime:
    cargo check --features {{ async_runtime }}
