AI Code Reviewer
AI-powered Python code reviewer using state-of-the-art language models — finds bugs, security issues and fixes them instantly.
Features
- 🔴 Security Detection — finds vulnerabilities like hardcoded secrets, SQL injection, unsafe
eval
- 🟡 Bug Detection — catches logic errors, runtime crashes, operator bugs, bad practices
- 🔵 Code Quality — suggests improvements for cleaner, more maintainable code
- ✨ One-Click Fix — apply all AI-suggested fixes with a single click
- 🚀 PR Simulation — push AI-fixed files directly to GitHub with an auto-generated commit message
How to Use
- Open any
.py file in VS Code
- Click the ▶ AI: Review Code button in the editor toolbar
(or open Command Palette →
AI: Review Code)
- View issues highlighted with color-coded severity underlines
- Click Quick Fix → ✨ Apply AI Fix (Full File) to fix the entire file instantly
- (Optional) Click $(git-pull-request) Push to GitHub to simulate a PR with an AI-generated commit message
Color Coding
| Color |
Meaning |
| 🔴 Red |
Security vulnerabilities (hardcoded secrets, SQL injection, eval) |
| 🟡 Yellow |
Logic bugs, runtime errors, operator mistakes |
| 🔵 Blue |
Code quality issues, unused imports, style suggestions |
How It Works
The extension uses a multi-stage analysis pipeline:
Stage 1 — Static Analysis
- AST Parser — detects structural issues: long functions, bad variable names, argument count
- Pylint — code quality and PEP8 style checking
- Bandit — security vulnerability scanning
- Radon — cyclomatic complexity measurement
Stage 2 — AI Deep Analysis
- CodeBERT — transformer-based model for semantic code understanding and security analysis
- CodeT5+ — code-aware model for generating intelligent fix suggestions
- LLM Reasoning Layer — deep analysis for logic bugs, missing error handling, and bad practices
All stages are orchestrated by an Analysis Engine that merges results, resolves conflicts, and returns precise line-level diagnostics.
PR Simulation Feature
After applying AI fixes, the extension can:
- Automatically generate a meaningful Git commit message based on the issues fixed
- Show it in an editable input box so you can review or modify it
- Run
git add → git commit → git push directly to your repository
This simulates a real-world CI/CD code review pipeline where an AI bot reviews and commits fixes before a pull request is opened.
Settings
| Setting |
Description |
Default |
aiReviewer.backendUrl |
Backend API URL |
https://ai-code-reviewer-f1mo.onrender.com |
You can change the backend URL via:
File → Preferences → Settings → Search "AI Reviewer"
Tech Stack
| Component |
Technology |
| VS Code Extension |
TypeScript |
| Backend Server |
Python, FastAPI, Uvicorn |
| AI Models |
CodeBERT, CodeT5+ |
| Static Analysis |
Pylint, Bandit, Radon, Python AST |
| Deployment |
Render |
Requirements
- VS Code
^1.90.0
- Internet connection (backend hosted on Render)
- Python project files (
.py)
| |