A simple AI-based Python tool to automatically review code for:
- Syntax errors
- Oversized functions
This project demonstrates the use of Python for static code analysis and is designed with extensibility in mind.
- Detects and reports syntax errors in Python files.
- Identifies functions exceeding a defined size threshold.
- Generates human-readable reports inside the
Reports/folder. - Modular design: review logic is separated (
ai.reviewer.py) from the main entry script (main.py).
- Language: Python 3.x
- Libraries Used:
ast,os,sys(no heavy dependencies)
- Clone the repository:
git clone https://github.com/siddharthkarn2212/AI-code-Reviewer.git cd AI-code-Reviewer - Run the reviewer on a test file:
python main.py sample_testing.py
- Check results inside the Reports/ folder.
π Project Structure
AI-code-Reviewer/ β βββ Reports/ # Stores generated reports βββ ai.reviewer.py # Core review logic βββ main.py # Entry point for execution βββ sample_testing.py # Example file to test reviewer βββ README.md # Documentation
π Future Improvements
- Extend error coverage beyond syntax and size.
- More types of checks (unused variables, complexity, etc.).
- Integrate with GitHub Actions for automated code reviews.
π License
This project is licensed under the MIT License.
π¨βπ» About
Author: Siddharth Karn Year: 2025 Contact: [email protected]