context-staged
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRun the codecontext staged check across all files in the git staging area.
bash
npx codecontext --stagedIf stale annotations are found:
- List each stale annotation with its file, line, and reason.
- For each, recommend either:
- Bumping to today if the context is still accurate.
[verified:YYYY-MM-DD] - Updating the annotation summary if the context changed.
- Removing the annotation if the code it described was deleted.
- Bumping
- Do not proceed with the commit until all annotations are verified.
If all annotations are fresh, confirm that the staged files are clear to commit.
对Git暂存区中的所有文件执行codecontext的暂存检查。
bash
npx codecontext --staged如果发现过期注释:
- 列出每个过期注释对应的文件、行号及原因。
- 针对每个过期注释,推荐以下处理方式之一:
- 如果上下文信息仍然准确,将更新为当前日期。
[verified:YYYY-MM-DD] - 如果上下文信息已变更,更新注释摘要。
- 如果注释描述的代码已被删除,移除该注释。
- 如果上下文信息仍然准确,将
- 在所有注释完成验证前,不允许继续提交。
如果所有注释均为最新状态,则确认暂存文件可以提交。