Files
foxhunt/scripts/analyze_clippy.sh
jgrusewski 8d89fe80ff chore: Second cleanup wave - organize root directory
- Archive: 85 agent .txt files → docs/archive/agents/legacy_txt/
- Scripts: Move 110 shell scripts → scripts/ (keep deploy.sh in root)
- Models: Move 18 .safetensors → ml/models/checkpoints/training_artifacts/
- Delete: 34 directories (~33GB freed) - target/, coverage_*, test artifacts
- Build: Clean 14 build artifacts (.rlib, .o, .pid, binaries)
- Tests: Move 14 .rs files → tests/standalone/
- SQL: Move 5 files → sql/ (keep init-db*.sql for Docker)
- Wave 153: Archive to docs/archive/historical/wave153/
- Docs: Archive 9 markdown files to wave_d/reports/ and historical/

Total impact: ~34GB freed (both waves), root directory cleaned from 583 to ~40 essential files
Directory count reduced from 65 to 31 (52% reduction)
All historical data preserved in organized archive structure
2025-10-30 01:26:02 +01:00

54 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Clippy Analysis Script for Wave 112 Agent 10
cd /home/jgrusewski/Work/foxhunt
echo "=== CLIPPY COMPREHENSIVE ANALYSIS ==="
echo ""
# Run clippy and save full output
timeout 300 cargo clippy --workspace --all-targets -- -D warnings 2>&1 > /tmp/clippy_full.txt
# Total error count
TOTAL_ERRORS=$(grep "error:" /tmp/clippy_full.txt | wc -l)
echo "Total Errors: $TOTAL_ERRORS"
echo ""
# Critical Safety Issues
echo "=== CRITICAL SAFETY ISSUES ==="
echo ""
echo "Unwrap/Panic Issues:"
grep -i "unwrap\|panic" /tmp/clippy_full.txt | grep "error:" | wc -l
echo ""
echo "Indexing/Slicing Panics:"
grep -i "indexing\|slicing" /tmp/clippy_full.txt | grep "error:" | wc -l
echo ""
echo "Dangerous Casts:"
grep -i "dangerous.*conversion\|cast.*wrap" /tmp/clippy_full.txt | grep "error:" | wc -l
echo ""
# Cosmetic Issues
echo "=== COSMETIC ISSUES ==="
echo ""
echo "Unnecessary hashes:"
grep "unnecessary hashes" /tmp/clippy_full.txt | wc -l
echo ""
echo "Integer suffix formatting:"
grep "integer type suffix" /tmp/clippy_full.txt | wc -l
echo ""
echo "Doc comments:"
grep "empty line after doc comment" /tmp/clippy_full.txt | wc -l
echo ""
echo "Must use attributes:"
grep "must_use" /tmp/clippy_full.txt | wc -l
echo ""
# Top 20 error types
echo "=== TOP 20 ERROR TYPES ==="
grep "error:" /tmp/clippy_full.txt | sed 's/.*error: //' | sed 's/\[.*//' | sort | uniq -c | sort -rn | head -20
# Critical files with most issues
echo ""
echo "=== FILES WITH MOST CRITICAL ISSUES ==="
grep -E "unwrap|panic|indexing|slicing|dangerous.*conversion" /tmp/clippy_full.txt | grep "error:" -A1 | grep "^ *-->" | sed 's/.*--> //' | sed 's/:.*//' | sort | uniq -c | sort -rn | head -20