docs: 更新known-patterns.json - 添加Git提交纪律模式
新增 pat-004: Git提交纪律 - 代码修改后未提交到Git导致问题重复发生 - 质量规则:完成修复后立即commit
This commit is contained in:
parent
8ebeb542b4
commit
e0a228188a
|
|
@ -47,18 +47,19 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pat-004": {
|
"pat-004": {
|
||||||
"name": "dist构建产物未及时更新",
|
"name": "Git提交纪律",
|
||||||
"source": "user_feedback",
|
"source": "user_feedback",
|
||||||
"confidence": 0.80,
|
"confidence": 0.95,
|
||||||
"applications": 3,
|
"applications": 3,
|
||||||
"created": "2026-03-22",
|
"created": "2026-03-22",
|
||||||
"category": "workflow",
|
"category": "workflow",
|
||||||
"pattern": "修改代码后构建产物没有更新",
|
"pattern": "代码修改后未提交到Git,npm install或操作导致工作目录恢复到旧状态",
|
||||||
"problem": "前端修改后没有重新npm run build",
|
"problem": "昨天修复的问题今天又发生,因为修改从未commit",
|
||||||
"solution": "建立标准流程:修改代码 → npm run build → 重启dev-server",
|
"solution": "每次修复完成后立即commit;建立开发流程规范",
|
||||||
"quality_rules": [
|
"quality_rules": [
|
||||||
"每次测试前确认dist是最新的",
|
"完成功能或修复后立即git commit",
|
||||||
"使用dev-server.mjs时每次修改都需要重新构建"
|
"git commit message要清晰描述修改内容",
|
||||||
|
"在git commit之前不要进行npm install等可能重置环境的操作"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pat-005": {
|
"pat-005": {
|
||||||
|
|
@ -75,6 +76,21 @@
|
||||||
"登录回调中使用window.location.href进行跳转",
|
"登录回调中使用window.location.href进行跳转",
|
||||||
"登出时也使用window.location.href = '/login'"
|
"登出时也使用window.location.href = '/login'"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"pat-006": {
|
||||||
|
"name": "dist构建产物未及时更新",
|
||||||
|
"source": "user_feedback",
|
||||||
|
"confidence": 0.80,
|
||||||
|
"applications": 3,
|
||||||
|
"created": "2026-03-22",
|
||||||
|
"category": "workflow",
|
||||||
|
"pattern": "修改代码后构建产物没有更新",
|
||||||
|
"problem": "前端修改后没有重新npm run build",
|
||||||
|
"solution": "建立标准流程:修改代码 → npm run build → 重启dev-server",
|
||||||
|
"quality_rules": [
|
||||||
|
"每次测试前确认dist是最新的",
|
||||||
|
"使用dev-server.mjs时每次修改都需要重新构建"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue