From 62dc54fe1c2dff4541cc18cea9298f42ac8e56b0 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 24 May 2026 23:37:34 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=A0=87=E5=87=86=EF=BC=88DoD=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E6=98=8E=E7=A1=AE=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=89=8D=E4=B8=8D=E5=BE=97=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 48ab34f..3f7f049 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -150,6 +150,45 @@ security: 修复入库单多租户隔离漏洞 --- +## 开发完成标准(Definition of Done) + +**任何功能或修复,必须满足以下全部条件才算完成:** + +### 后端变更 + +```bash +# 1. 编译通过 +export PATH="/opt/homebrew/bin:$PATH" +cd backend && go build ./... + +# 2. 所有测试通过(不得有 FAIL) +cd backend && go test ./... + +# 3. 无编译警告(vet 检查) +cd backend && go vet ./... +``` + +### 前端变更 + +```bash +# 1. 静态分析无 error(warning/info 允许存在) +cd client && flutter analyze --no-fatal-infos --no-fatal-warnings + +# 2. 所有测试通过 +cd client && flutter test +``` + +### 通用要求 + +- [ ] 代码已按 Git 提交规范提交(feat/fix/test/...) +- [ ] 涉及新接口:已在对应测试文件中覆盖核心路径 +- [ ] 涉及数据库变更:schema.sql 和 model 同步更新 +- [ ] 多租户隔离未被破坏(所有查询含 shop_id 条件) + +**测试未通过前,禁止提交代码、禁止打 tag 发版。** + +--- + ## 代码质量门禁 以下情况**不得提交**: