| name | code-review-checklist |
| description | Language-agnostic code review guidelines. Adapts conventions to each language's standards. |
Code Review Checklist - Agnóstico por Lenguaje
IMPORTANT: This checklist adapts to the language being reviewed.
Rule: Follow the conventions of the LANGUAGE, not JavaScript/Java defaults.
🔍 Auto-Detección de Lenguaje
Antes de hacer code review, detecta el lenguaje:
├── .py → Python (PEP 8 conventions)
├── .java → Java (Oracle conventions)
├── .cs → C# (Microsoft .NET conventions)
├── .go → Go (Go Code Review Comments)
├── .rs → Rust (Rust API Guidelines)
├── .rb → Ruby (Ruby Style Guide)
├── .ts/.js → JS/TS (Airbnb/Google)
├── .php → PHP (PSR-12)
├── .swift → Swift (Apple conventions)
└── .kt → Kotlin (JetBrains conventions)
📋 Quick Review Checklist (Adaptado por Lenguaje)
Correctness (通用的)
Security (通用的)
Performance (adaptado por lenguaje)
🔴 Naming Conventions by Language
| ❌ WRONG (assume wrong convention) | ✅ CORRECT (follows language) |
|---|
| camelCase in Python | snake_case |
| snake_case in C# | PascalCase |
| snake_case in Go (exported) | PascalCase for exported |
| camelCase in Rust | snake_case |
Python Review
def GetUserById(userId):
MAX_CONNECTIONS = 100
user_list = []
def get_user_by_id(user_id: int) -> Optional[User]:
MAX_CONNECTIONS = 100
user_list: List[User] = []
C# Review
public class user_service {
public int max_connections { get; set; }
public User get_user_by_id(int user_id) { ... }
}
public class UserService
{
public int MaxConnections { get; set; }
public User GetUserById(int userId) { ... }
}
Go Review
func get_user_by_id(user_id int) (*User, error) {
max_connections := 100
return get_user_by_id(user_id)
}
func GetUserByID(userID int) (*User, error) {
maxConnections := 100
return userID, nil
}
📋 Code Quality (Language-Agnostic)
DRY - No Repeated Code
SOLID Principles (Aplicables a todos)
Small Functions
Error Handling
🔴 Anti-Patterns to Flag (Multi-Language)
Magic Numbers (All Languages)
| ❌ Wrong | ✅ Correct |
|---|
if status == 3 | Named constant |
sleep(5000) | Named constant with units |
Deep Nesting (All Languages)
if (a) {
if (b) {
if (c) {
doSomething();
}
}
}
if (!a) return;
if (!b) return;
if (!c) return;
doSomething();
Long Functions (All Languages)
| ❌ | ✅ |
|---|
| 100+ lines | Split into smaller functions |
Any Type (TypeScript/JavaScript specific)
const data: any = ...
const data: UserData = ...
Type Safety Issues
def get_user(id):
return id
def get_user(user_id: int) -> Optional[User]:
return user_id
fn get_user(id) -> Option<User> {
Some(User { id })
}
fn get_user(user_id: i32) -> Option<User> {
Some(User { id: user_id })
}
🛡️ Security Checklist (Language-Agnostic)
### Input Validation
- [ ] All inputs validated?
- [ ] Sanitized before use?
### Authentication/Authorization
- [ ] Proper auth checks?
- [ ] No auth bypasses?
### Secrets
- [ ] No hardcoded API keys?
- [ ] No passwords in code?
- [ ] Environment variables used?
### SQL Injection
- [ ] Parameterized queries?
- [ ] ORM used properly?
- [ ] No string concatenation in queries?
### XSS
- [ ] Output encoding?
- [ ] Sanitized HTML?
- [ ] CSRF tokens?
🧪 Testing Review
| Check | Pregunta |
|---|
| [ ] Unit tests added for new code? | Coverage adequate? |
| [ ] Edge cases tested? | Empty, null, large values? |
| [ ] Tests readable? | Clear intent? |
| [ ] Tests isolated? | No dependencies on external state? |
🔍 Language-Specific Checks
Python
| Check | What to look for |
|---|
| Type hints | Public functions should have type hints |
| PEP 8 | Use Black/isort for formatting |
| Exceptions | Catch specific exceptions, not bare except |
C# / .NET
| Check | What to look for |
|---|
| PascalCase | All public members PascalCase |
| var usage | Use var when type is obvious |
| LINQ | Prefer LINQ over loops for queries |
Go
| Check | What to look for |
|---|
| Exported/Unexported | PascalCase = exported, snake_case = private |
| Error handling | Always check errors |
| Context usage | Pass context for cancellation |
Rust
| Check | What to look for |
|---|
| Ownership | No unnecessary clones |
| Error handling | Use Result for fallible functions |
| lifetimes | Explicit lifetimes where needed |
📝 Review Comments Guide
// Bloqueadores importantes - 🔴
🔴 BLOCKING: SQL injection vulnerability here
// Sugerencias importantes - 🟡
🟡 SUGGESTION: Consider using useMemo for performance
// Nits menores - 🟢
🟢 NIT: Prefer const over let for immutable variable
// Preguntas - ❓
❓ QUESTION: What happens if user is null here?
// Convenciones de lenguaje - ⚙️
⚙️ CONVENTION: snake_case is used for functions in Python, not camelCase
✅ Review Complete Checklist
| Check | Question |
|---|
| ✅ | Naming follows language conventions? |
| ✅ | Security issues addressed? |
| ✅ | Error handling in place? |
| ✅ | Tests added/updated? |
| ✅ | No obvious bugs? |
| ✅ | Code is maintainable? |
Remember: A good code review adapts to the language's conventions.
Don't enforce JavaScript conventions on Python code, or vice versa.
Follow the idioms of the language being reviewed.