feat: add copilot instructions for coding standards and best practices#49
Merged
chenyme merged 1 commit intolinux-do:masterfrom Jul 3, 2025
OrenZhang:chore_copilot
Merged
feat: add copilot instructions for coding standards and best practices#49chenyme merged 1 commit intolinux-do:masterfrom OrenZhang:chore_copilot
chenyme merged 1 commit intolinux-do:masterfrom
OrenZhang:chore_copilot
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new Copilot instruction file defining coding standards and best practices for the Linux Do CDK project.
- Introduces general guidelines for consistency, readability, and maintainability
- Defines backend conventions (Go, RESTful APIs, MySQL/Redis, Swagger, response format)
- Specifies frontend rules (TypeScript typing, component organization, icon placement)
Comments suppressed due to low confidence (3)
.github/copilot-instructions.md:16
- 当前未提及测试相关规范。建议增加一节,强制要求为新增或修改的后端功能编写单元测试和集成测试,并定义覆盖率门槛。
## 后端规范
.github/copilot-instructions.md:22
- 建议在响应结构中添加一个
error_code字段,以便客户端能够根据错误代码进行分支处理,而不仅依赖error_msg文本。
- API 响应格式统一为 {"error_msg": "", "data": {}} 结构
.github/copilot-instructions.md:20
- [nitpick] 建议补充 Go 结构体字段的
json标签命名规范,确保在序列化时与数据库 snake_case 字段保持一致。
- Go 代码遵循 gofmt 标准格式,使用 snake_case 命名数据库字段
chenyme
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
例行检查
变更内容
添加 GitHub Copilot 的 System Prompt