osvm 0.4.3

OpenSVM CLI tool for managing SVM nodes and deployments
Documentation
#!/bin/bash
#
# Pre-commit hook for osvm-cli
# This hook enforces code formatting and linting before commits
#

set -e

echo "Running pre-commit checks..."

# Check if cargo is available
if ! command -v cargo &> /dev/null; then
    echo "Error: cargo is not available. Please install Rust and Cargo."
    exit 1
fi

# Run cargo fmt check
echo "🔍 Checking code formatting..."
if ! cargo fmt --all -- --check; then
    echo "❌ Code formatting check failed!"
    echo "💡 Please run 'cargo fmt --all' to fix formatting issues."
    exit 1
fi
echo "✅ Code formatting is correct"

# Run clippy check (allow it to continue despite known issues, similar to CI)
echo "🔍 Running clippy checks..."
# Following the same pattern as CI - allowing clippy to continue with known webpki issues
if ! cargo clippy --all-targets --all-features -- -D warnings 2>/dev/null; then
    echo "⚠️  Clippy check completed with warnings (some known issues may exist)"
    echo "💡 Consider reviewing clippy suggestions, but this won't block the commit"
else
    echo "✅ Clippy checks passed"
fi

echo "✅ All pre-commit checks completed successfully!"
exit 0