# Default recipe to display help information
default:
@just --list
# Run all quality checks
check:
@echo "๐ Running all quality checks..."
just fmt-check
just clippy
just test
just build
# Auto-fix formatting and clippy issues
fix:
@echo "๐ง Auto-fixing issues..."
cargo fmt
cargo clippy --fix --allow-dirty --allow-staged
# Check code formatting
fmt:
cargo fmt
# Check code formatting (CI mode)
fmt-check:
@echo "๐ Checking code formatting..."
cargo fmt --all -- --check
# Run clippy lints
clippy:
@echo "๐ Running clippy..."
cargo clippy --all-targets --all-features -- -D warnings
# Run tests
test:
@echo "๐งช Running tests..."
cargo test
# Build release binary
build:
@echo "๐๏ธ Building release..."
cargo build --release
# Install the binary locally
install:
@echo "๐ฆ Installing ccat..."
cargo install --path .
# Clean build artifacts
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
# Run security audit
audit:
@echo "๐ Running security audit..."
cargo audit
# Check for outdated dependencies
outdated:
@echo "๐
Checking for outdated dependencies..."
cargo outdated
# Update dependencies
update:
@echo "โฌ๏ธ Updating dependencies..."
cargo update
# Generate documentation
docs:
@echo "๐ Generating documentation..."
cargo doc --open
# Run benchmarks
bench:
@echo "โก Running benchmarks..."
cargo bench
# Profile the application
profile:
@echo "๐ Profiling application..."
cargo build --release
perf record target/release/ccat --help
perf report
# Release patch version (0.1.0 -> 0.1.1)
release-patch:
@echo "๐ Releasing patch version..."
./quick-release.sh patch
# Release minor version (0.1.0 -> 0.2.0)
release-minor:
@echo "๐ Releasing minor version..."
./quick-release.sh minor
# Release major version (0.1.0 -> 1.0.0)
release-major:
@echo "๐ Releasing major version..."
./quick-release.sh major
# Setup development environment
setup:
@echo "๐ ๏ธ Setting up development environment..."
rustup component add clippy rustfmt
cargo install cargo-audit cargo-outdated
# Show project statistics
stats:
@echo "๐ Project statistics:"
@echo "Lines of code:"
find src -name "*.rs" -exec wc -l {} + | tail -1
@echo "Dependencies:"
cargo tree --depth 1 | wc -l
@echo "Test coverage:"
cargo test 2>&1 | grep "test result" || echo "No tests found"
# Lint all files
lint:
@echo "๐ Linting all files..."
just clippy
just fmt-check