An intelligent, automated code review tool that combines Abstract Syntax Tree (AST) analysis, Machine Learning classification, and Large Language Model-powered suggestions to detect code smells and provide actionable refactoring advice.
- 🔬 AST-Based Detection - Static code analysis using Python's Abstract Syntax Tree to identify anti-patterns
- 🤖 ML-Powered Classification - Scikit-Learn Logistic Regression model classifies issue severity (Low/Medium/High)
- 💡 AI-Generated Suggestions - OpenAI GPT-4 provides contextual, educational refactoring recommendations
- 🎨 Interactive UI - Beautiful Streamlit interface with syntax highlighting and real-time feedback
- ⚡ Fast & Accurate - Analyzes code in seconds with configurable detection thresholds
- Long Functions - Functions exceeding recommended line counts
- Too Many Parameters - Functions with excessive parameter lists
- God Classes - Classes with too many responsibilities
- Complex Conditions - Overly nested or complex conditional logic
- Deep Nesting - Excessive indentation levels
- Python 3.11 or higher
- OpenAI API key
- AST Parsing - Code is parsed into an Abstract Syntax Tree
- Pattern Matching - Tree traversal identifies anti-patterns
- Feature Extraction - Metrics extracted for ML classification
- Severity Prediction - Logistic Regression classifies issue severity
- AI Suggestion - GPT-4 generates contextual refactoring advice
This tool not only identifies problems but teaches best practices by:
- Explaining WHY code smells are problematic
- Providing before/after code examples
- Referencing SOLID principles and design patterns
- Offering constructive, educational feedback



