# Justfile for cargo-samply
# Run all checks (test, clippy, format)
check:
#!/usr/bin/env bash
echo "๐ Running all checks..."
echo ""
echo "๐ Checking formatting..."
cargo fmt --check
echo "โ
Formatting check passed"
echo ""
echo "๐ Running clippy..."
cargo clippy --all-targets --all-features
echo "โ
Clippy check passed"
echo ""
echo "๐งช Running tests..."
cargo test --release
echo "โ
All tests passed"
echo ""
echo "๐ All checks passed successfully!"
# Run strict checks (test, clippy with deny warnings, format)
check-strict:
#!/usr/bin/env bash
echo "๐ Running strict checks..."
echo ""
echo "๐ Checking formatting..."
cargo fmt --check
echo "โ
Formatting check passed"
echo ""
echo "๐ Running clippy (strict)..."
cargo clippy --all-targets --all-features -- -D warnings
echo "โ
Clippy strict check passed"
echo ""
echo "๐งช Running tests..."
cargo test --release
echo "โ
All tests passed"
echo ""
echo "๐ All strict checks passed successfully!"
# Clean all target directories from test cargo projects
clean:
#!/usr/bin/env bash
echo "Cleaning target directories from test projects..."
find tests/ -name "target" -type d -exec rm -rf {} + 2>/dev/null || true
echo "Done cleaning test target directories."
# Clean main project target directory
clean-main:
cargo clean
# Clean everything (main project + test projects)
clean-all: clean clean-main
echo "All target directories cleaned."
# Run tests (matches CI configuration)
test:
cargo test --release
# Run tests with trycmd overwrite (for updating test snapshots)
test-overwrite:
TRYCMD=overwrite cargo test --release