diff-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Diff Check

Diff 检查

Perform routine cleanup and validation before committing code or submitting a PR.
在提交代码或发起PR前执行常规清理与验证。

When to Use

使用时机

  • Before any
    git commit
  • Before marking a PR ready for review
  • After implementing changes, before requesting review
  • 在任何
    git commit
    之前
  • 在标记PR为可评审状态之前
  • 完成变更实现后,请求评审之前

Checklist

检查清单

1. Scope & Focus

1. 范围与聚焦

  • Changes are within the scope of the task/PR
  • No redundant or unnecessary code changes
  • No unrelated formatting or whitespace changes
  • 变更处于任务/PR的范围内
  • 无冗余或不必要的代码变更
  • 无无关的格式或空白字符变更

2. Code Cleanup

2. 代码清理

  • No debugging code left in (console.log, print, dbg!, etc.)
  • No testing stubs or mock data in production code
  • No commented-out code blocks (unless intentionally preserved)
  • No self-explanatory comments that clutter code
  • 未遗留调试代码(如console.log、print、dbg!等)
  • 生产代码中无测试桩或模拟数据
  • 无注释掉的代码块(除非是有意保留的)
  • 无冗余的自解释注释(避免代码杂乱)

3. Security

3. 安全性

  • No secrets, API keys, or credentials exposed
  • No hardcoded local file paths (e.g., /home/user1/...)
  • No sensitive information in comments or logs
  • 未暴露密钥、API密钥或凭证
  • 无硬编码的本地文件路径(如/home/user1/...)
  • 注释或日志中无敏感信息

4. Consistency

4. 一致性

  • Code follows project lint/format rules
  • Naming conventions are consistent
  • Import statements are organized
  • 代码遵循项目的lint/格式化规则
  • 命名约定保持一致
  • 导入语句已整理

5. Plan Alignment

5. 计划对齐

  • Relevant checkboxes in plan.md are marked complete
  • Commit message is clear and follows conventions
  • plan.md中的相关复选框已标记为完成
  • 提交信息清晰且遵循约定

6. Branch Health (PR only)

6. 分支健康(仅PR适用)

  • Synced with main/target branch
  • No merge conflicts
  • CI checks pass (if applicable)
  • 已与主分支/目标分支同步
  • 无合并冲突
  • CI检查通过(如适用)

Process

流程

  1. Review all staged/modified files
  2. Walk through checklist above
  3. Report any issues found with recommended fixes
  4. Do NOT make changes automatically—report for human confirmation
  1. 查看所有暂存/已修改的文件
  2. 逐一核对上述检查清单
  3. 报告发现的问题并给出修复建议
  4. 请勿自动进行变更——需提交给人工确认

Output Format

输出格式

[DIFF CHECK COMPLETE]

Files reviewed: [N]
Issues found: [M]

Critical:
- [file:line] [issue description]

Warnings:
- [file:line] [issue description]

Suggestions:
- [recommendation]

Status: [READY / NEEDS FIXES]
[DIFF CHECK COMPLETE]

Files reviewed: [N]
Issues found: [M]

Critical:
- [file:line] [issue description]

Warnings:
- [file:line] [issue description]

Suggestions:
- [recommendation]

Status: [READY / NEEDS FIXES]