Skip to content

feat: add copilot instructions for coding standards and best practices#49

Merged
chenyme merged 1 commit intolinux-do:masterfrom
OrenZhang:chore_copilot
Jul 3, 2025
Merged

feat: add copilot instructions for coding standards and best practices#49
chenyme merged 1 commit intolinux-do:masterfrom
OrenZhang:chore_copilot

Conversation

@OrenZhang
Copy link
Copy Markdown
Contributor

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 MIT 许可证进行许可,
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并,

变更内容

添加 GitHub Copilot 的 System Prompt

@OrenZhang OrenZhang self-assigned this Jul 3, 2025
Copilot AI review requested due to automatic review settings July 3, 2025 12:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 chenyme self-requested a review July 3, 2025 12:47
@chenyme chenyme merged commit 6912bed into linux-do:master Jul 3, 2025
9 checks passed
@OrenZhang OrenZhang deleted the chore_copilot branch July 3, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants