Development Tools
This project includes comprehensive Rust formatting and linting tools to maintain code quality.
Quick Commands
# Format code
./scripts/fmt.sh
# or
cargo fmt --all
# Run linter
./scripts/lint.sh
# or
cargo clippy --all-targets --all-features -- -D warnings
# Run all quality checks
./scripts/check-all.sh
Pre-commit Hooks
The project uses pre-commit hooks to automatically check code quality before commits:
# Install pre-commit hooks
pre-commit install
# Run hooks manually on all files
pre-commit run --all-files
# Run specific hook
pre-commit run cargo-clippy
# Auto-fix formatting (manual stage)
pre-commit run cargo-fmt-fix --hook-stage manual
Configuration Files
rustfmt.toml- Code formatting configurationclippy.toml- Linting rules and thresholds.vscode/settings.json- VS Code settings for Rust development
Available Hooks
- cspell - Spell checking for code and comments
- cargo-fmt-check - Formatting validation (runs on commit)
- cargo-clippy - Linting and code analysis (runs on commit)
- cargo-check - Compilation check (runs on commit)
- cargo-fmt-fix - Auto-format code (manual stage only)
- cargo-test - Run tests (manual stage only)
VS Code Integration
The project includes VS Code settings that:
- Enable format-on-save with rustfmt
- Run clippy on save for real-time linting
- Configure proper Rust file associations
- Set up PATH for cargo/rustc tools