reviewing-code
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReviewing Code
代码审查
Prioritized, actionable feedback. Assume good intent.
优先级明确、可执行的反馈。假设代码编写者初衷是好的。
Priority Levels
优先级等级
| Level | Prefix | Meaning |
|---|---|---|
| Blocker | 🚨 | Must fix before merge |
| Suggestion | ⚠️ | Should consider |
| Nit | 💭 | Optional polish |
| Question | ❓ | Need clarification |
| Praise | ✨ | Done well |
| 等级 | 前缀 | 含义 |
|---|---|---|
| 阻塞项 | 🚨 | 合并前必须修复 |
| 建议项 | ⚠️ | 建议考虑优化 |
| 细微优化 | 💭 | 可选的打磨项 |
| 疑问项 | ❓ | 需要澄清 |
| 表扬项 | ✨ | 做得好的地方 |
Checklist
检查清单
Blockers (Security & Correctness)
阻塞项(安全与正确性)
- No secrets/credentials in code
- User input validated/sanitized
- Auth checks present where needed
- Edge cases handled (null, empty, errors)
- No race conditions in async code
- 代码中无密钥/凭证
- 用户输入已验证/清理
- 必要位置存在权限校验
- 已处理边缘情况(空值、空输入、错误)
- 异步代码中无竞态条件
High Priority (Performance & Logic)
高优先级(性能与逻辑)
- No N+1 queries
- Large lists paginated
- Expensive ops not in render loops
- Error handling appropriate
- 无N+1查询问题
- 大型列表已分页
- 渲染循环中无昂贵操作
- 错误处理得当
Medium Priority (Maintainability)
中优先级(可维护性)
- Functions have single responsibility
- No copy-paste duplication
- Naming is clear
- 函数遵循单一职责原则
- 无复制粘贴的重复代码
- 命名清晰易懂
Output Format
输出格式
markdown
undefinedmarkdown
undefinedSummary
总结
[Approve / Request Changes / Discuss]
[批准 / 请求变更 / 讨论]
🚨 Blockers
🚨 阻塞项
- - Issue and fix
file:line
- - 问题及修复方案
文件:行号
⚠️ Suggestions
⚠️ 建议项
- - Suggestion and why
file:line
- - 建议及原因
文件:行号
💭 Nits
💭 细微优化
- - Minor improvement
file:line
- - 小幅改进建议
文件:行号
✨ Good Stuff
✨ 亮点
- What was done well
undefined- 做得好的地方
undefinedCommon Issues
常见问题
React: Missing useEffect deps, state that should be derived, prop drilling
TypeScript: types, missing null checks
API: Missing loading/error states, unbounded queries
anyFor detailed React/hooks patterns and accessibility checks, see REACT-PATTERNS.md.
React:缺少useEffect依赖项、应派生的状态、属性透传
TypeScript:类型、缺少空值检查
API:缺少加载/错误状态、无限制查询
any如需了解详细的React/hooks模式和可访问性检查,请查看REACT-PATTERNS.md。