-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* all: update copyright headers to keep consistent with the description in the CONTRIBUTING.md file of the trpc repository https://github.com/trpc-group/trpc/blob/main/CONTRIBUTING.md#copyright-headers * all: update copyright headers to keep consistent with the description in the CONTRIBUTING.md file of the trpc repository https://github.com/trpc-group/trpc/blob/main/CONTRIBUTING.md#copyright-headers * update
- Loading branch information
Showing
60 changed files
with
959 additions
and
456 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,128 @@ | ||
# How to Contribute | ||
English | [中文](CONTRIBUTING.zh_CN.md) | ||
|
||
Thank you for your interest and support in tRPC! | ||
# How to Contribute | ||
|
||
We welcome and appreciate any form of contribution, including but not limited to submitting issues, providing improvement suggestions, improving documentation, fixing bugs, and adding features. | ||
Thank you for your interest and support in go-codec! | ||
|
||
We welcome and appreciate any form of contribution, including but not limited to submitting issues, providing improvement suggestions, improving documentation, fixing bugs, and adding features. | ||
This document aims to provide you with a detailed contribution guide to help you better participate in the project. | ||
|
||
Please read this guide carefully before contributing and make sure to follow the rules here. | ||
|
||
We look forward to working with you to make this project better together! | ||
|
||
## Before submitting an issue | ||
|
||
Please make sure that you have reviewed the project's documentation, FAQ, and existing issues. | ||
|
||
This can avoid submitting known issues repeatedly and save your and the project maintainer's time. | ||
|
||
When you decide to submit an issue, please follow these rules: | ||
- Select appropriate labels for the issue. This helps us to quickly locate the problem and solve it as soon as possible. | ||
- Ensure that the issue title is concise and accurately summarizes the problem. Avoid using vague words such as "problem" or "error". | ||
|
||
In the issue description, please provide a detailed description of the problem you encountered. | ||
|
||
This includes but is not limited to the following: | ||
- Problem description: briefly describe the symptoms and impact of the problem. | ||
- Reproduction steps: describe in detail how to reproduce the problem, so that we can locate and solve the problem more quickly. | ||
- Environment information: relevant information including operating system, browser, project version, etc. | ||
- Error log: if there are relevant error logs, please provide them. | ||
- Expected results: describe what the correct result should be. | ||
- Screenshots or screen recordings: if possible, provide screenshots or screen recordings of the problem. | ||
## Before contributing code | ||
|
||
Please be polite and friendly. | ||
The project welcomes code patches, but to make sure things are well coordinated you should discuss any significant change before starting the work. | ||
It's recommended that you signal your intention to contribute in the issue tracker, either by claiming an [existing one](https://github.com/trpc-ecosystem/go-codec/issues) or by [opening a new issue](https://github.com/trpc-ecosystem/go-codec/issues/new). | ||
|
||
We attach great importance to the environment of the project and hope that everyone can grow together in a friendly and inclusive environment. | ||
### Checking the issue tracker | ||
|
||
## Rules for submitting PRs | ||
Whether you already know what contribution to make, or you are searching for an idea, the [issue tracker](https://github.com/trpc-ecosystem/go-codec/issues) is always the first place to go. | ||
Issues are triaged to categorize them and manage the workflow. | ||
|
||
We welcome you to submit code for the project. | ||
Most issues will be marked with one of the following workflow labels: | ||
- **NeedsInvestigation**: The issue is not fully understood and requires analysis to understand the root cause. | ||
- **NeedsDecision**: The issue is relatively well understood, but the go-codec team hasn't yet decided the best way to address it. | ||
It would be better to wait for a decision before writing code. | ||
If you are interested in working on an issue in this state, feel free to "ping" maintainers in the issue's comments if some time has passed without a decision. | ||
- **NeedsFix**: The issue is fully understood and code can be written to fix it. | ||
|
||
Before submitting a PR, please make sure that you have read this contribution guide. | ||
### Opening an issue for any new problem | ||
|
||
Here are some suggestions and rules regarding submitting PRs. | ||
Excluding very trivial changes, all contributions should be connected to an existing issue. | ||
Feel free to open one and discuss your plans. | ||
This process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside the goals for the language and tools. | ||
It also checks that the design is sound before code is written; the code review tool is not the place for high-level discussions. | ||
|
||
Please read them carefully before submitting: | ||
- Ensure that your code conforms to the project's code specifications. This includes but is not limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and consistency of the project. | ||
- Before submitting a PR, please make sure that you have tested your code locally. Ensure that the code has no obvious errors and can run normally. | ||
- Please select appropriate labels for your PR. This helps us to process your PR more quickly. | ||
- Ensure that your PR title is concise and accurately summarizes your changes. Avoid using vague words such as "update" or "modify". | ||
- In the PR description, please provide a detailed description of your changes. This includes but is not limited to the following: | ||
- Reason for modification: briefly explain why this modification is necessary. | ||
- Modification content: describe in detail what you have modified and how you have implemented it. | ||
- Scope of impact: describe the functions or modules that may be affected by the modification. | ||
- Testing: describe the testing you have done locally and the results. | ||
- If your PR resolves a certain issue, please associate the corresponding issue in the PR description. For example: Fixes #123. | ||
When opening an issue, make sure to answer these five questions: | ||
1. What version of go-codec are you using ? | ||
2. What operating system and processor architecture are you using(`go env`)? | ||
3. What did you do? | ||
4. What did you expect to see? | ||
5. What did you see instead? | ||
|
||
## Communication and Consultation | ||
For change proposals, see Proposing Changes To [tRPC-Proposals](https://github.com/trpc-group/trpc/tree/main/proposal). | ||
|
||
We welcome you to participate in the project's communication and consultation. | ||
## Contributing code | ||
|
||
You can interact with us through the following channels: | ||
- Submit your questions or suggestions in the project's discussions. | ||
- Join our technical communication group. | ||
Follow the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) to [create a GitHub pull request](https://docs.github.com/en/get-started/quickstart/github-flow#create-a-pull-request). | ||
If this is your first time submitting a PR to the go-codec project, you will be reminded in the "Conversation" tab of the PR to sign and submit the [Contributor License Agreement](https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md). | ||
Only when you have signed the Contributor License Agreement, your submitted PR has the possibility of being accepted. | ||
|
||
--- | ||
Some things to keep in mind: | ||
- Ensure that your code conforms to the project's code specifications. | ||
This includes but is not limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and consistency of the project. | ||
- Before submitting a PR, please make sure that you have tested your code locally(`go test ./...`). | ||
Ensure that the code has no obvious errors and can run normally. | ||
- To update the pull request with new code, just push it to the branch; | ||
you can either add more commits, or rebase and force-push (both styles are accepted). | ||
- If the request is accepted, all commits will be squashed, and the final commit description will be composed by concatenating the pull request's title and description. | ||
The individual commits' descriptions will be discarded. | ||
See following "Write good commit messages" for some suggestions. | ||
|
||
# 如何作出贡献 | ||
### Writing good commit messages | ||
|
||
首先,感谢您对本开源项目的关注和支持! | ||
Commit messages in go-codec follow a specific set of conventions, which we discuss in this section. | ||
|
||
我们非常欢迎和感谢任何形式的贡献,包括但不限于提交问题、提出改进意见、完善文档、修复缺陷以及新增功能。 | ||
Here is an example of a good one: | ||
|
||
本文档旨在为您提供一份详尽的贡献指南,以便您更好地参与到项目中。 | ||
|
||
请在参与贡献之前仔细阅读本指南,并确保遵循其中的规则和建议。 | ||
> math: improve Sin, Cos and Tan precision for very large arguments | ||
> | ||
> The existing implementation has poor numerical properties for | ||
> large arguments, so use the McGillicutty algorithm to improve | ||
> accuracy above 1e10. | ||
> | ||
> The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm | ||
> | ||
> Fixes #159 | ||
我们期待与您一起打造一个更加完善的开源项目! | ||
|
||
## 提交 issue 的规则 | ||
#### First line | ||
|
||
在提交 issue 之前,请先确保您已经查看了项目的文档、常见问题解答以及已有的 issue。 | ||
The first line of the change description is conventionally a short one-line summary of the change, prefixed by the primary affected package. | ||
|
||
这样可以避免重复提交已知问题,节省您和项目维护者的时间。 | ||
A rule of thumb is that it should be written so to complete the sentence "This change modifies go-codec to _____." | ||
That means it does not start with a capital letter, is not a complete sentence, and actually summarizes the result of the change. | ||
|
||
当您确定需要提交一个 issue 时,请遵循以下规则: | ||
- 为 issue 选择合适的标签。这有助于我们更快地找到问题所在,以便尽快解决。 | ||
- 请确保您的 issue 标题简洁明了,能够准确概括问题所在。避免使用模糊的词语,如“问题”、“错误”等。 | ||
Follow the first line by a blank line. | ||
|
||
在 issue 描述中,请详细说明您遇到的问题。 | ||
#### Main content | ||
|
||
包括但不限于以下内容: | ||
- 问题描述:简要说明问题的现象和影响。 | ||
- 复现步骤:详细描述如何复现问题,让我们能够更快地定位和解决问题。 | ||
- 环境信息:包括操作系统、浏览器、项目版本等相关信息。 | ||
- 错误日志:如果有相关错误日志,请一并提供。 | ||
- 期望结果:描述您期望的正确结果是什么。 | ||
- 截图或录屏:如果可能,请提供问题现象的截图或录屏。 | ||
The rest of the description elaborates and should provide context for the change and explain what it does. | ||
Write in complete sentences with correct punctuation, just like for your comments in go-codec. | ||
Don't use HTML, Markdown, or any other markup language. | ||
Add any relevant information, such as benchmark data if the change affects performance. | ||
The [benchstat](https://godoc.org/golang.org/x/perf/cmd/benchstat) tool is conventionally used to format benchmark data for change descriptions. | ||
|
||
请保持礼貌和友好。我们非常重视项目的氛围,希望每个人都能够在友好、包容的环境中共同成长。 | ||
#### Referencing issues | ||
|
||
## 提交 PR 的规则 | ||
The special notation "Fixes #12345" associates the change with issue 12345 in the go-codec issue tracker. | ||
When this change is eventually applied, the issue tracker will automatically mark the issue as fixed. | ||
|
||
我们非常欢迎您为项目提交代码。 | ||
|
||
在提交 PR 之前,请确保您已经阅读了项目的文档以及本贡献指南。 | ||
## Miscellaneous topics | ||
|
||
以下是关于提交 PR 的一些建议和规则,请在提交前仔细阅读: | ||
### Copyright headers | ||
|
||
- 请确保您的代码符合项目的代码规范。这包括但不限于代码风格、注释规范等。这有助于我们保持项目的整洁和一致性。 | ||
- 在提交 PR 之前,请确保您已经在本地测试过您的代码。确保代码没有明显的错误,并能够正常运行。 | ||
- 请为您的 PR 选择合适的标签。这有助于我们更快地处理您的 PR。 | ||
- 请确保您的 PR 标题简洁明了,能够准确概括您的修改。避免使用模糊的词语,如“更新”、“修改”等。 | ||
- 在 PR 描述中,请详细说明您的修改内容。包括但不限于以下内容: | ||
- 修改原因:简要说明为什么要进行这次修改。 | ||
- 修改内容:详细描述您修改了哪些内容,以及修改的具体实现。 | ||
- 影响范围:说明修改可能影响到的功能或模块。 | ||
- 测试情况:描述您在本地测试的情况,以及测试结果。 | ||
- 如果您的 PR 解决了某个 issue,请在 PR 描述中关联对应的 issue。例如:Fixes #123。 | ||
Files in the go-codec repository don't list author names, both to avoid clutter and to avoid having to keep the lists up to date. | ||
Instead, your name will appear in the change log. | ||
|
||
## 技术交流与问题咨询 | ||
New files that you contribute should use the standard copyright header: | ||
|
||
我们非常欢迎您参与到项目的技术交流和问题咨询中来。 | ||
```go | ||
// | ||
// | ||
// Tencent is pleased to support the open source community by making tRPC available. | ||
// | ||
// Copyright (C) 2023 THL A29 Limited, a Tencent company. | ||
// All rights reserved. | ||
// | ||
// If you have downloaded a copy of the tRPC source code from Tencent, | ||
// please note that tRPC source code is licensed under the Apache 2.0 License, | ||
// A copy of the Apache 2.0 License is included in this file. | ||
// | ||
// | ||
``` | ||
|
||
您可以通过以下途径与我们互动: | ||
- 在项目的 discussions 中提交您的问题或建议 | ||
- 加入我们的技术交流群 | ||
Files in the repository are copyrighted the year they are added. | ||
Do not update the copyright year on files that you change. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
[English](CONTRIBUTING.md) | 中文 | ||
|
||
# 如何贡献 | ||
|
||
感谢您对 go-codec 的关注和支持! | ||
|
||
我们欢迎并感激任何形式的贡献,包括但不限于提交 issue、提供改进建议、改进文档、修复错误和添加功能。 | ||
本文档旨在为您提供详细的贡献指南,以帮助您更好地参与项目。 | ||
在贡献之前,请仔细阅读本指南并确保遵循这里的规则。 | ||
我们期待与您共同努力,使这个项目变得更好! | ||
|
||
## 在贡献代码之前 | ||
|
||
项目欢迎代码补丁,但为了确保事情得到良好协调,您应该在开始工作之前讨论任何重大变更。 | ||
建议您在 issue 跟踪器中表明您的贡献意图,可以通过[认领现有 issue](https://github.com/trpc-ecosystem/go-codec/issues)或[创建新 issue](https://github.com/trpc-ecosystem/go-codec/issues/new) 来实现。 | ||
|
||
### 查看 issue 跟踪器 | ||
|
||
无论您已经知道要做哪些贡献,还是正在寻找想法,[issue 跟踪器](https://github.com/trpc-ecosystem/go-codec/issues)始终是您的第一个去处。 | ||
issue 会被分类以管理工作流程。 | ||
|
||
大多数 issue 都会被标记为以下工作流标签之一: | ||
- **NeedsInvestigation**:issue 尚未完全理解,需要分析以了解根本原因。 | ||
- **NeedsDecision**:issue 相对已经理解得很好,但 go-codec 团队尚未决定解决 issue 的最佳方法。 | ||
在编写代码之前最好等待决策。 | ||
如果一段时间内没有决策且您有兴趣处理处于这种状态的 issue,请随时在 issue 评论中“ping”维护者。 | ||
- **NeedsFix**:issue 已完全理解,可以编写代码进行修复。 | ||
|
||
### 为任何新问题打开一个 issue | ||
|
||
除非是非常细小的变更,否则所有贡献都应与现有 issue 有关。 | ||
请随时打开一个 issue 并讨论您的计划。 | ||
这个过程让每个人都有机会验证设计,有助于防止工作重复,确保想法符合语言和工具的目标。 | ||
在编写代码之前,还可以检查设计是否合理;代码审查工具并非用于高层次的讨论。 | ||
|
||
在提交 issue 时,请确保回答以下五个问题: | ||
1. 您正在使用哪个版本的go-codec? | ||
2. 您正在使用哪个操作系统和处理器架构(go env)? | ||
3. 您做了什么? | ||
4. 您期望看到什么? | ||
5. 您实际看到的是什么? | ||
|
||
关于变更提案,请参阅 [tRPC-Proposals](https://github.com/trpc-group/trpc/tree/main/proposal) 提议变更。 | ||
|
||
## 贡献代码 | ||
|
||
遵循 [GitHub 流程](https://docs.github.com/en/get-started/quickstart/github-flow)来[创建 GitHub PR(Pull Request)](https://docs.github.com/en/get-started/quickstart/github-flow#create-a-pull-request)。 | ||
|
||
如果你是第一次向 go-codec 项目提交 PR,那么在该 PR 的对话栏中会提醒你签署并提交[贡献者许可协议](https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md)。 | ||
只有当你签署过贡献者许可协议,你提交的 PR 才有可能被接受。 | ||
请记住以下几点: | ||
|
||
- 确保您的代码符合项目的代码规范。 | ||
这包括但不限于代码风格、注释规范等。这有助于我们维护项目的整洁性和一致性。 | ||
- 在提交 PR 之前,请确保您已在本地测试过您的代码。 确保代码没有明显的错误并且可以正常运行。 | ||
- 要使用新代码更新拉取请求,只需将其推送到分支; 您可以添加更多提交,也可以 rebase 并 force-push(两种风格都可以接受)。 | ||
- 如果请求被接受,所有提交将被压缩,最终提交描述将由 PR 的标题和描述组成。 | ||
单个提交的描述将被丢弃。 请参阅以下“编写良好的提交消息”以获取一些建议。 | ||
|
||
### 编写良好的提交消息 | ||
|
||
go-codec 中的提交消息遵循一套特定的约定,我们将在本节中讨论。 | ||
|
||
以下是一个良好的示例: | ||
> math: improve Sin, Cos and Tan precision for very large arguments | ||
> | ||
> The existing implementation has poor numerical properties for large arguments, so use the McGillicutty algorithm to improve accuracy above 1e10. | ||
> | ||
> The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm | ||
> | ||
> Fixes #159 | ||
#### 第一行 | ||
|
||
变更描述的第一行通常是一个简短的一行摘要,描述变更的内容,并以主要受影响的包为前缀。 | ||
|
||
一个经验法则是,它应该被写成完成句子 "This change modifies go-codec to _____." 这意味着它不以大写字母开头,不是一个完整的句子,而且确实概括了变更的结果。 | ||
|
||
在第一行之后空一行。 | ||
|
||
#### 主要内容 | ||
|
||
描述的其余部分应该详细说明,为变更提供上下文并解释它的作用。 | ||
像在 go-codec 中的注释一样,使用正确的标点符号写完整的句子。 | ||
不要使用 HTML、Markdown 或任何其他标记语言。 | ||
添加任何相关信息,例如如果变更影响性能,请添加基准数据。 | ||
[benchstat](https://godoc.org/golang.org/x/perf/cmd/benchstat)工具通常用于为变更描述格式化基准数据。 | ||
|
||
#### 引用 issue | ||
|
||
特殊表示法 "Fixes #12345" 将变更与 go-codec issue 跟踪器中的 issue 12345关联。 | ||
当此变更最终应用时,issue 跟踪器将自动将该 issue 标记为已修复。 | ||
|
||
## 其他主题 | ||
|
||
### 版权声明 | ||
|
||
go-codec 代码仓库中的文件不列出作者姓名,以避免混乱并避免不断更新列表。 | ||
而您的名字将出现在变更日志中。 | ||
|
||
您贡献的新文件应使用标准版权声明: | ||
```go | ||
// | ||
// | ||
// Tencent is pleased to support the open source community by making tRPC available. | ||
// | ||
// Copyright (C) 2023 THL A29 Limited, a Tencent company. | ||
// All rights reserved. | ||
// | ||
// If you have downloaded a copy of the tRPC source code from Tencent, | ||
// please note that tRPC source code is licensed under the Apache 2.0 License, | ||
// A copy of the Apache 2.0 License is included in this file. | ||
// | ||
// | ||
``` | ||
|
||
代码仓库中的文件在添加时受版权保护。 | ||
在变更文件时,请勿更新版权年份。 |
This file contains 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
Oops, something went wrong.