mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-09-04 23:16:41 +08:00
refactor: simplify architecture and harden lifecycle
Remove obsolete implementations, centralize background task ownership and terminal-state recovery, consolidate frontend routing and log streaming, and enforce project-wide verification in CI.
This commit is contained in:
@@ -25,17 +25,17 @@ For significant features or refactors, open an issue first to align on scope bef
|
||||
## Pull requests
|
||||
|
||||
1. Fork and create a topic branch (e.g. `fix/windows-path-escape`)
|
||||
2. Run `make test` and make sure everything passes
|
||||
2. Run `make verify` and make sure formatting, tests, builds, and documentation checks pass
|
||||
3. Keep changes focused — one concern per PR
|
||||
4. Write commit messages in Chinese following `类型: 简要描述` — examples:
|
||||
- `功能: 新增审计日志模块`
|
||||
- `修复: 目录浏览器无法进入子目录`
|
||||
- `重构: 简化存储目标解密逻辑`
|
||||
- Types: `功能` / `修复` / `重构` / `文档` / `构建` / `测试`
|
||||
4. Write Conventional Commits with a Chinese subject — examples:
|
||||
- `feat(audit): 新增审计日志模块`
|
||||
- `fix(browser): 修复目录浏览器无法进入子目录`
|
||||
- `refactor(storage): 简化存储目标解密逻辑`
|
||||
- Types: `feat` / `fix` / `docs` / `style` / `refactor` / `perf` / `test` / `chore`
|
||||
5. PR title and body in Chinese too. Describe the why and how, not just the what.
|
||||
|
||||
## Coding guidelines
|
||||
|
||||
- **Go** — handle every error (no `_ = err`); use the existing logger (`zap`); no `fmt.Println` in production paths
|
||||
- **TypeScript** — strict mode, no implicit any, follow existing ESLint/Prettier configs
|
||||
- **TypeScript** — strict mode, no implicit any, and pass the repository ESLint and Prettier checks
|
||||
- **Commit scope** — one logical change per commit; don't mix drive-by cleanups with feature work
|
||||
|
||||
+7
-7
@@ -25,17 +25,17 @@ BackupX 使用 Apache License 2.0 开源,欢迎提交 Issue 与 Pull Request
|
||||
## 提交 PR
|
||||
|
||||
1. Fork 仓库,创建主题分支(如 `fix/windows-path-escape`)
|
||||
2. 执行 `make test` 确认本地全通过
|
||||
2. 执行 `make verify`,确认格式、测试、构建和文档检查全部通过
|
||||
3. 保持每个 PR 只做一件事
|
||||
4. Commit message 使用中文,格式 `类型: 简要描述`:
|
||||
- `功能: 新增审计日志模块`
|
||||
- `修复: 目录浏览器无法进入子目录`
|
||||
- `重构: 简化存储目标解密逻辑`
|
||||
- 类型:`功能` / `修复` / `重构` / `文档` / `构建` / `测试`
|
||||
4. Commit message 使用 Conventional Commits,主题使用中文:
|
||||
- `feat(audit): 新增审计日志模块`
|
||||
- `fix(browser): 修复目录浏览器无法进入子目录`
|
||||
- `refactor(storage): 简化存储目标解密逻辑`
|
||||
- 类型:`feat` / `fix` / `docs` / `style` / `refactor` / `perf` / `test` / `chore`
|
||||
5. PR 标题和正文同样使用中文,描述"为什么"和"怎么做",而非仅仅"做了什么"
|
||||
|
||||
## 代码规范
|
||||
|
||||
- **Go** — 所有错误必须处理(禁止 `_ = err`),日志使用现有 `zap`,禁止生产路径中出现 `fmt.Println`
|
||||
- **TypeScript** — 严格模式,禁止隐式 any,遵循现有 ESLint/Prettier 配置
|
||||
- **TypeScript** — 严格模式,禁止隐式 any,并通过仓库中的 ESLint 和 Prettier 检查
|
||||
- **Commit 粒度** — 每个 commit 一件事,不要把顺手的小修改和功能代码混在一起
|
||||
|
||||
Reference in New Issue
Block a user