Code Review
Review the provided code (file, diff, or selection) systematically.
Review Checklist
- •Correctness — Logic errors, off-by-ones, edge cases, wrong assumptions
- •Bugs — Null/None handling, uninitialized variables, race conditions
- •Types & shapes — Tensor dtype/device mismatches, shape errors, implicit casts
- •Security — Injection, hardcoded secrets, unsafe deserialization
- •Style — Naming, dead code, unnecessary complexity, consistency with surrounding code
- •Performance — Unnecessary copies, repeated computation, memory leaks
Output Format
For each issue found:
- •File and line: where the issue is
- •Severity: critical / warning / nit
- •What: one-line description
- •Why: brief explanation
- •Fix: suggested change (code snippet if helpful)
If no issues are found, say so — don't invent problems.
Scope
$ARGUMENTS