josharsh/100LinesOfAICode
đ New Tool: Code Complexity Analyzer (AI-powered)
Ouverte
#21 ouverte le 22 nov. 2025
ai-poweredenhancementhacktoberfesthelp-wantednew-tool
Métriques du dépÎt
- Stars
-  (4 étoiles)
- Métriques de merge PR
-  (Aucune PR mergée en 30 j)
Description
đŻ Goal
Create a new tool that analyzes code complexity and suggests simplifications!
đ Description
Build complexity-analyzer/ - a tool that:
- Scans code files
- Identifies complex functions (cyclomatic complexity, nesting)
- Uses Claude to suggest simplifications
- Shows before/after comparisons
đĄ Example Usage
python analyze.py mycode.py
đ Found 3 complex functions:
ââââââââââââââââââââââââ
Function: calculate_total (line 45)
Complexity: 12 (high)
đĄ Suggestion:
Extract nested loops into separate functions
Consider using list comprehensions
ââââââââââââââââââââââââ
đš Implementation Ideas
- Use
radonormccabefor complexity metrics - Parse code with
astmodule - Send complex code to Claude for analysis
- Format suggestions nicely
đ Structure
complexity-analyzer/
âââ analyze.py (main script, <100 lines!)
âââ README.md
âââ examples/
âââ before.py
âââ after.py
â Acceptance Criteria
- Analyzes Python files (bonus: other languages)
- Identifies functions above complexity threshold
- AI suggestions are actionable
- Under 100 lines (excluding README)
- Clean terminal output
- Examples showing improvement
đ Learning Outcomes
- AST parsing
- Code quality metrics
- AI-powered refactoring
- CLI design
Estimated time: 5-8 hours Impact: New tool that helps developers write better code! Cool factor: đ„đ„đ„