Files
foxhunt/analyze_clippy.sh
jgrusewski a38215a388 🔧 Wave 112: Clippy raw output and analysis tools
- Full clippy output files (errors, warnings, results)
- Analysis scripts for processing clippy warnings
- Support files for Agent 10 clippy analysis
2025-10-05 22:23:17 +02: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