docs(docs): 记录提交信息 scope 规则

要求提交标题统一使用 type(scope): 中文说明,并在开发指南和贡献指南中补充示例。
This commit is contained in:
2026-07-15 21:28:22 +08:00
parent b4b4f25cb3
commit 0d07b9f4ce
2 changed files with 20 additions and 14 deletions
+11 -8
View File
@@ -73,17 +73,20 @@ make fmt
```bash
git add .
git commit -m "feat: 添加新功能"
git commit -m "feat(cli): 添加 doctor 命令骨架"
```
提交信息遵循 [Conventional Commits](https://www.conventionalcommits.org/) 规范:
- `feat:` 新功能
- `fix:` 修复 bug
- `docs:` 文档更新
- `style:` 代码格式(不影响功能)
- `refactor:` 重构
- `test:` 测试相关
- `chore:` 构建工具或辅助工具
- 必须使用 `type(scope): 中文说明` 格式。
- `type` 使用 `feat``fix``docs``style``refactor``test``chore` 等 Conventional Commits 类型。
- `scope` 必须写具体模块或文档域,例如 `ffi``docs``cli``cas``official-sync`
- 提交标题和正文默认使用简体中文;代码标识符、协议字段和命令参数仍保持英文。
示例:
- `feat(cli): 添加 doctor 命令骨架`
- `fix(docs): 修正官方同步运行说明`
- `refactor(ffi): 降级 FFI 为可选兼容层`
### 4. 推送和 PR