mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-14 13:47:24 +08:00
📝 新增开发规范
This commit is contained in:
parent
fd1d73cc32
commit
49a15d512e
@ -48,6 +48,12 @@ The `src` directory is the application part, please develop business logic in th
|
|||||||
- Ensure that the comment style is [`Google Docstring`](https://google.github.io/styleguide/pyguide.html) or
|
- Ensure that the comment style is [`Google Docstring`](https://google.github.io/styleguide/pyguide.html) or
|
||||||
[`Liteyuki Docstring`](https://github.com/LiteyukiStudio/litedoc?tab=readme-ov-file#liteyuki-docstring)(recommended) to ensure that Litedoc can parse and generate documentation correctly.
|
[`Liteyuki Docstring`](https://github.com/LiteyukiStudio/litedoc?tab=readme-ov-file#liteyuki-docstring)(recommended) to ensure that Litedoc can parse and generate documentation correctly.
|
||||||
- If there is a part for ordinary users, ensure that the documentation is complete (each language has corresponding documentation).
|
- If there is a part for ordinary users, ensure that the documentation is complete (each language has corresponding documentation).
|
||||||
|
- commit message should follow the following guidelines:
|
||||||
|
- You should commit the code after completing a feature or fixing a bug, and not mix the code of multiple features or bugs together.
|
||||||
|
- We use gitmoji to mark the type of commit, such as `:sparkles:` for introducing new features, `:bug:` for fixing bugs, etc., please refer to [gitmoji](https://gitmoji.dev/) for details.
|
||||||
|
- The format of the commit message is `<emoji> [module]: <message>`, such as `:sparkles: [liteyuki.event]: add new feature`,
|
||||||
|
where the module field is the affected part, such as `liteyuki.message`, `docs.en.guide.md`, etc., not much is required, but please fill in as much as possible; the message field is a brief description, in summary, what you did.
|
||||||
|
- There is no restriction on the language of the commit message, and bilingual use is possible if conditions permit.
|
||||||
- The documentation should follow [`Markdown`](https://www.markdownguide.org/) syntax and support vitepress-related content:
|
- The documentation should follow [`Markdown`](https://www.markdownguide.org/) syntax and support vitepress-related content:
|
||||||
- Revise the documentation for each language when editing.
|
- Revise the documentation for each language when editing.
|
||||||
- Ensure that the links in the document are correct and do not lead to inaccessible links.
|
- Ensure that the links in the document are correct and do not lead to inaccessible links.
|
||||||
|
@ -40,14 +40,21 @@ order: 0
|
|||||||
|
|
||||||
## 规范化
|
## 规范化
|
||||||
- 代码请遵循[`PEP8`](https://pep8.org/)和[`Google Python Style Guide`](https://google.github.io/styleguide/pyguide.html)
|
- 代码请遵循[`PEP8`](https://pep8.org/)和[`Google Python Style Guide`](https://google.github.io/styleguide/pyguide.html)
|
||||||
- 此外,提交到轻雪仓库的代码,请遵循以下规范:
|
- 提交到轻雪仓库的代码,请遵循以下规范:
|
||||||
- 请确保代码是可运行的,没有危害的。
|
- 请确保代码是可运行的,没有危害的。
|
||||||
- 请确保代码的类型提示是正确的。
|
- 请确保代码的类型提示是正确的。
|
||||||
- 请确保注释风格为[`Google Docstring`](https://google.github.io/styleguide/pyguide.html)或[`Liteyuki Docstring`](https://github.com/LiteyukiStudio/litedoc?tab=readme-ov-file#liteyuki-docstring)(推荐)以保证Litedoc能够正确解析并生成文档。
|
- 请确保注释风格为[`Google Docstring`](https://google.github.io/styleguide/pyguide.html)或[`Liteyuki Docstring`](https://github.com/LiteyukiStudio/litedoc?tab=readme-ov-file#liteyuki-docstring)(推荐)以保证Litedoc能够正确解析并生成文档。
|
||||||
|
- 字符串请使用双引号`"`,尽量避免使用单引号`'`,但在嵌套字符串时可以使用单引号。
|
||||||
- 若有面向普通用户部分,请确保文档是完善的(每种语言都有对应的文档)。
|
- 若有面向普通用户部分,请确保文档是完善的(每种语言都有对应的文档)。
|
||||||
|
- commit message请遵循以下规范:
|
||||||
|
- 应在每次完成一个功能或修复一个bug后提交代码,不要将多个功能或多个bug的代码混在一起提交。
|
||||||
|
- 我们使用gitmoji来标记commit的类型,如`:sparkles:`表示引入新功能,`:bug:`表示修复bug等,具体请参考[gitmoji](https://gitmoji.dev/)
|
||||||
|
- commit message的格式为`<emoji> [module]: <message>`,如`:sparkles: [liteyuki.event]: add new feature`,
|
||||||
|
其中module字段为受影响部分,例如`liteyuki.message`,`docs.en.guide.md`等,不作过多要求,但请尽量填写;message字段为简短的描述,总结来说就是你干了什么。
|
||||||
|
- 不限制commit message的语言,有条件可以使用中英双语。
|
||||||
- 文档请遵循[`Markdown`](https://www.markdownguide.org/)语法,并且支持vitepress相关内容:
|
- 文档请遵循[`Markdown`](https://www.markdownguide.org/)语法,并且支持vitepress相关内容:
|
||||||
- 编辑文档时每个语言的文档都要修订。
|
- 修订文档时,每个语言的文档都要修订。
|
||||||
- 请确保文档内的链接是正确的,不要出现无法访问的链接。
|
- 请确保文档内的链接是正确的,不要出现无法访问的死链接。
|
||||||
- 请确保**用户文档**是通俗易懂的,**开发文档**是详细的。
|
- 请确保**用户文档**是通俗易懂的,**开发文档**是详细的。
|
||||||
|
|
||||||
## 最后
|
## 最后
|
||||||
|
Loading…
Reference in New Issue
Block a user