已合并
【PR】: 在 contributing 中提醒开发者通过 pre-commit 做代码格式化,避免流水线报错 #1367
【PR】: 在 contributing 中提醒开发者通过 pre-commit 做代码格式化,避免流水线报错 #1367
已合并
shengnan创建于 7月20日
2 个文件变更+8-6
@@ -21,7 +21,8 @@
21 - 接口命名规范21 - 接口命名规范
22 - 配置参数命名规范22 - 配置参数命名规范
23 - 代码流程规范23 - 代码流程规范
24-4. 提交pr时,如果存在多个无效commit,建议您在提交pr前先进rebase操作合并多个commit为一个,以保持代码的简洁性和可读性,具体参考[git rebase](https://git-scm.com/docs/git-rebase)同时,commit message也需要符合项目的代码规范能够清晰地描述次变更的意图和内容,格式为:<类型>: <简短描述> 例如:24+4. 流水线会执 code check未经过 pre-commit 中 clang-format 格式化的代码将被拦截。建议安装 pre-commit并在仓库根目录执行 `pre-commit install`以便地 commit 时自动检查并格式化代码
25+5. 提交pr时,如果存在多个无效commit,建议您在提交pr前先进行rebase操作,合并多个commit为一个,以保持代码的简洁性和可读性,具体参考[git rebase](https://git-scm.com/docs/git-rebase),同时,commit message也需要符合项目的代码规范,能够清晰地描述本次变更的意图和内容,格式为:<类型>: <简短描述>。 例如:
25 26 
26|类型|说明|示例|27|类型|说明|示例|
27|--|--|--|28|--|--|--|
@@ -57,9 +58,9 @@
57 如果您在本项目中发现某些文档描述错误,欢迎您新建Issue进行反馈和修复。58 如果您在本项目中发现某些文档描述错误,欢迎您新建Issue进行反馈和修复。
58 59 
59 您可以按照[提交Issue/处理Issue任务](https://gitcode.com/cann/community#提交Issue处理Issue任务)指引新建 `Documentation|文档反馈` 类Issue指出对应文档的问题,然后在评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您纠正对应文档描述。60 您可以按照[提交Issue/处理Issue任务](https://gitcode.com/cann/community#提交Issue处理Issue任务)指引新建 `Documentation|文档反馈` 类Issue指出对应文档的问题,然后在评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您纠正对应文档描述。
60- 61+ 
61- 帮助解决他人Issue62- 帮助解决他人Issue
62 63 
63 如果社区中他人遇到的问题您有合适的解决方法,欢迎您在Issue中发表评论交流,帮助他人解决问题和痛点,共同优化易用性。64 如果社区中他人遇到的问题您有合适的解决方法,欢迎您在Issue中发表评论交流,帮助他人解决问题和痛点,共同优化易用性。
64 65 
65- 如果对应Issue需要进行代码修改,您可以在Issue评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您,跟踪协助解决问题。66+ 如果对应Issue需要进行代码修改,您可以在Issue评论框中输入“/assign”或“/assign @yourself”,将该Issue分配给您,跟踪协助解决问题。
@@ -21,7 +21,8 @@ In addition, developers need to pay attention to the following points when prepa
21 - Interface naming specifications21 - Interface naming specifications
22 - Configuration parameter naming specifications22 - Configuration parameter naming specifications
23 - Code flow specifications23 - Code flow specifications
24-4. When submitting a PR, if there are multiple invalid commits, it is recommended that you perform a rebase operation before submitting the PR to merge multiple commits into one to maintain code simplicity and readability. For details, see [git rebase](https://git-scm.com/docs/git-rebase). At the same time, the commit message must also conform to the project code specifications and clearly describe the intent and content of this change. The format is: <type>: <brief description>. For example:24+4. The pipeline runs a code check and rejects code that has not been formatted by clang-format through pre-commit. We recommend installing pre-commit and running `pre-commit install` in the repository root so that each local commit is automatically checked and formatted.
25+5. When submitting a PR, if there are multiple invalid commits, it is recommended that you perform a rebase operation before submitting the PR to merge multiple commits into one to maintain code simplicity and readability. For details, see [git rebase](https://git-scm.com/docs/git-rebase). At the same time, the commit message must also conform to the project code specifications and clearly describe the intent and content of this change. The format is: <type>: <brief description>. For example:
25 26 
26|Type|Description|Example|27|Type|Description|Example|
27|--|--|--|28|--|--|--|
@@ -56,9 +57,9 @@ Developer contribution scenarios mainly include:
56 If you discover certain document description errors in this project, you are welcome to create an Issue for feedback and correction.57 If you discover certain document description errors in this project, you are welcome to create an Issue for feedback and correction.
57 58 
58 You can follow the [Submit Issue/Handle Issue Task](https://gitcode.com/cann/community#提交Issue处理Issue任务) guide to create a `Documentation|Document Feedback` type Issue to point out the corresponding document problem, then enter "/assign" or "/assign @yourself" in the comment box to assign the Issue to yourself to correct the corresponding document description.59 You can follow the [Submit Issue/Handle Issue Task](https://gitcode.com/cann/community#提交Issue处理Issue任务) guide to create a `Documentation|Document Feedback` type Issue to point out the corresponding document problem, then enter "/assign" or "/assign @yourself" in the comment box to assign the Issue to yourself to correct the corresponding document description.
59- 60+ 
60- Help Solve Others' Issues61- Help Solve Others' Issues
61 62 
62 If you have appropriate solutions for problems encountered by others in the community, you are welcome to post comments in the Issue to exchange ideas, help others solve problems and pain points, and jointly optimize usability.63 If you have appropriate solutions for problems encountered by others in the community, you are welcome to post comments in the Issue to exchange ideas, help others solve problems and pain points, and jointly optimize usability.
63 64 
64- If the corresponding Issue requires code modification, you can enter "/assign" or "/assign @yourself" in the Issue comment box to assign the Issue to yourself to track and assist in solving the problem.65+ If the corresponding Issue requires code modification, you can enter "/assign" or "/assign @yourself" in the Issue comment box to assign the Issue to yourself to track and assist in solving the problem.