# Quality Gates Quick Reference ## Current Status - **Warning Count:** 302 / 50 (threshold) - **Compilation:** ✅ Clean (no errors) - **Quality Gates:** 🔒 Active ## Quick Commands ```bash # Check warning status ./scripts/check-warnings.sh # Normal commit (quality checks run automatically) git commit -m "your message" # Emergency bypass (use sparingly) git commit --no-verify -m "emergency: reason" # Test hooks manually .git/hooks/pre-commit .git/hooks/pre-push # Count current warnings cargo check --workspace 2>&1 | grep "warning:" | wc -l ``` ## What Gets Blocked ### Pre-Commit Hook Blocks: - ❌ Compilation errors - ❌ Warning count > 50 - ⚠️ Warns about `.unwrap()` usage - ⚠️ Warns about `.expect("")` empty messages ### Pre-Push Hook Blocks: - ❌ Test failures - ⚠️ Uncommitted changes (warning only) ## Quick Fixes ### Top Warning Types and Solutions 1. **Missing Debug (95 warnings)** ```rust #[derive(Debug)] pub struct YourStruct { ... } ``` 2. **Unused Imports (7 warnings)** - Remove the unused import lines 3. **Unused Variables (50 warnings)** ```rust let _unused = value; // Prefix with underscore ``` 4. **Non-snake_case (6 warnings)** ```rust pub struct Example { ssm_a_matrices: Vec, // Fix: lowercase } ``` 5. **Missing Documentation (56 warnings)** ```rust /// Description of field pub field_name: Type, ``` ## Emergency Procedures ### If You Must Bypass 1. Understand the risk (introducing technical debt) 2. Document why in commit message 3. Create tracking issue 4. Use bypass flag: ```bash git commit --no-verify -m "emergency: production fix for X" ``` ### If Hooks Are Broken ```bash # Reinstall hooks chmod +x .git/hooks/pre-commit chmod +x .git/hooks/pre-push # Test manually .git/hooks/pre-commit ``` ## Documentation - **Development Guide:** `DEVELOPMENT.md` - **Wave 19 Details:** `docs/wave19-quality-gates.md` - **Project Overview:** `CLAUDE.md` ## Contact For questions about quality gates, see `DEVELOPMENT.md` or the Wave 19 documentation. --- **Remember:** These gates prevent regressions. They're here to help, not hinder. **Threshold:** 50 warnings | **Current:** 302 warnings | **Goal:** <50 warnings by Wave 20