Cursor rule
.cursor/rules/zh-code-review.mdcCursor rules
Quality
50/100
Scores the file, not the repository.Length
304 words
14 headings · 1 code blocksRepository
6
— · pushed 80 days agoLast changed
3 days ago
First indexed 3 days ago.1# 代码审查标准23## 目的45代码审查确保代码合并前的质量、安全性和可维护性。此规则定义何时以及如何进行代码审查。67## 何时审查89**强制审查触发条件:**1011- 编写或修改代码后12- 提交到共享分支之前13- 更改安全敏感代码时(认证、支付、用户数据)14- 进行架构更改时15- 合并 pull request 之前1617**审查前要求:**1819在请求审查之前,确保:2021- 所有自动化检查(CI/CD)已通过22- 合并冲突已解决23- 分支已与目标分支同步2425## 审查检查清单2627在标记代码完成之前:2829- [ ] 代码可读且命名良好30- [ ] 函数聚焦(<50 行)31- [ ] 文件内聚(<800 行)32- [ ] 无深层嵌套(>4 层)33- [ ] 错误显式处理34- [ ] 无硬编码密钥或凭据35- [ ] 无 console.log 或调试语句36- [ ] 新功能有测试37- [ ] 测试覆盖率满足 80% 最低要求3839## 安全审查触发条件4041**停止并使用 security-reviewer 代理当:**4243- 认证或授权代码44- 用户输入处理45- 数据库查询46- 文件系统操作47- 外部 API 调用48- 加密操作49- 支付或金融代码5051## 审查严重级别5253| 级别 | 含义 | 行动 |54|-------|---------|--------|55| CRITICAL(关键) | 安全漏洞或数据丢失风险 | **阻止** - 合并前必须修复 |56| HIGH(高) | Bug 或重大质量问题 | **警告** - 合并前应修复 |57| MEDIUM(中) | 可维护性问题 | **信息** - 考虑修复 |58| LOW(低) | 风格或次要建议 | **注意** - 可选 |5960## 代理使用6162使用这些代理进行代码审查:6364| 代理 | 用途 |65|-------|--------|66| **code-reviewer** | 通用代码质量、模式、最佳实践 |67| **security-reviewer** | 安全漏洞、OWASP Top 10 |68| **typescript-reviewer** | TypeScript/JavaScript 特定问题 |69| **python-reviewer** | Python 特定问题 |70| **go-reviewer** | Go 特定问题 |71| **rust-reviewer** | Rust 特定问题 |7273## 审查工作流7475```761. 运行 git diff 了解更改772. 先检查安全检查清单783. 审查代码质量检查清单794. 运行相关测试805. 验证覆盖率 >= 80%816. 使用适当的代理进行详细审查82```8384## 常见问题捕获8586### 安全8788- 硬编码凭据(API 密钥、密码、令牌)89- SQL 注入(查询中的字符串拼接)90- XSS 漏洞(未转义的用户输入)91- 路径遍历(未净化的文件路径)92- CSRF 保护缺失93- 认证绕过9495### 代码质量9697- 大函数(>50 行)- 拆分为更小的98- 大文件(>800 行)- 提取模块99- 深层嵌套(>4 层)- 使用提前返回100- 缺少错误处理 - 显式处理101- 变更模式 - 优先使用不可变操作102- 缺少测试 - 添加测试覆盖103104### 性能105106- N+1 查询 - 使用 JOIN 或批处理107- 缺少分页 - 给查询添加 LIMIT108- 无界查询 - 添加约束109- 缺少缓存 - 缓存昂贵操作110111## 批准标准112113- **批准**:无关键或高优先级问题114- **警告**:仅有高优先级问题(谨慎合并)115- **阻止**:发现关键问题116117## 与其他规则的集成118119此规则与以下规则配合:120121- [testing.md](testing.md) - 测试覆盖率要求122- [security.md](security.md) - 安全检查清单123- [git-workflow.md](git-workflow.md) - 提交标准124- [agents.md](agents.md) - 代理委托125
Also in ThanhTrunggDEV/DontBeLazy
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ThanhTrunggDEV/DontBeLazy.cursor/rules/zh-agents.mdc · 6 | Cursor rules | no sections | 50/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/zh-patterns.mdc · 6 | Cursor rules | api | 30/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.agent/AGENTS.md · 6 | AGENTS.md | buildteststylearch+4 | 77/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/AGENTS.md · 6 | AGENTS.md | buildteststylearch+4 | 77/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-agents.mdc · 6 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-code-review.mdc · 6 | Cursor rules | styletesting-strategygitsecurity+3 | 65/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-coding-style.mdc · 6 | Cursor rules | style | 54/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-development-workflow.mdc · 6 | Cursor rules | gitagent-behaviour | 39/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-git-workflow.mdc · 6 | Cursor rules | lint-formatgitagent-behaviour | 43/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-hooks.mdc · 6 | Cursor rules | styletypessecuritydo-not | 36/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-patterns.mdc · 6 | Cursor rules | lint-formatstyleapi | 52/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-performance.mdc · 6 | Cursor rules | buildperformance | 48/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-security.mdc · 6 | Cursor rules | security | 39/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/common-testing.mdc · 6 | Cursor rules | testtesting-strategyagent-behaviour | 34/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-coding-style.mdc · 6 | Cursor rules | lint-formatstyle | 52/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-hooks.mdc · 6 | Cursor rules | buildlint-formatdeployment | 60/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-patterns.mdc · 6 | Cursor rules | style | 54/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-security.mdc · 6 | Cursor rules | securityperformancedo-not | 73/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/cpp-testing.mdc · 6 | Cursor rules | testtesting-strategy | 55/100 | 3 days ago | |
| ThanhTrunggDEV/DontBeLazy.cursor/rules/csharp-coding-style.mdc · 6 | Cursor rules | lint-formatstyletypes | 66/100 | 3 days ago |
Diff against .cursor/rules/zh-agents.mdc Diff against .cursor/rules/zh-patterns.mdc Diff against .agent/AGENTS.md Diff against .cursor/AGENTS.md Diff against .cursor/rules/common-agents.mdc Diff against .cursor/rules/common-code-review.mdc Diff against .cursor/rules/common-coding-style.mdc Diff against .cursor/rules/common-development-workflow.mdc Diff against .cursor/rules/common-git-workflow.mdc Diff against .cursor/rules/common-hooks.mdc Diff against .cursor/rules/common-patterns.mdc Diff against .cursor/rules/common-performance.mdc Diff against .cursor/rules/common-security.mdc Diff against .cursor/rules/common-testing.mdc Diff against .cursor/rules/cpp-coding-style.mdc Diff against .cursor/rules/cpp-hooks.mdc Diff against .cursor/rules/cpp-patterns.mdc Diff against .cursor/rules/cpp-security.mdc Diff against .cursor/rules/cpp-testing.mdc Diff against .cursor/rules/csharp-coding-style.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
