- Pin the required Antislop release and document installation - Reject Antislop findings during quality checks
22 lines
801 B
Bash
Executable File
22 lines
801 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Formatting has no warning level: --check makes any difference a hard failure.
|
|
cargo fmt --all -- --check
|
|
|
|
# Keep the explicit flag even though Cargo.toml denies Rust warnings so direct
|
|
# and automated Clippy runs have the same, visible contract.
|
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
antislop_version=0.3.0
|
|
if ! command -v antislop >/dev/null 2>&1 ||
|
|
[[ "$(antislop --version)" != "antislop ${antislop_version}" ]]; then
|
|
echo "antislop ${antislop_version} is required; install it with: cargo install antislop --version ${antislop_version} --locked" >&2
|
|
exit 1
|
|
fi
|
|
antislop .
|
|
|
|
cargo test --all-targets --all-features
|
|
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
|
|
cargo build --release --all-targets --all-features
|