-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update documents for CONTRIBUTING
And fix keymap typo
- Loading branch information
Showing
9 changed files
with
283 additions
and
38 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,6 +1,52 @@ | ||
## How to contribute | ||
# Contributing | ||
|
||
- All code and text must be written in English. | ||
- All commits must follow the [DCO](https://developercertificate.org/). | ||
- Commit message must follow the [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). | ||
- [How to test](./doc/test.md) | ||
## Any comments and suggestions are always welcome | ||
|
||
**Before opening new Issue/Discussion/PR, you should search related [Issues][issue]/[Discussions][discussion]/[PRs][PR] first** for avoiding to create duplicated links. | ||
|
||
- For new feature request, open a [discussion][], describe your demand concisely and clearly. | ||
- For new feature submit, open a [PR][], describe your demand and design concisely and clearly. | ||
- For bug report, open an [issue][], describe the bug concisely and clearly. | ||
- For bug fix, open a [PR][], concisely and clearly describe what you fixed. | ||
- For question and suggestion, open a [discussion][]. | ||
- For anything not mentioned above, open a [discussion][]. | ||
|
||
### No +1 | ||
|
||
Do not post duplicated and useless comments like `+1`, `LOL`, `Me too`, `I too would like to see this issue fixed.`, `When is this issue going to be fixed?`. | ||
|
||
Such comments do not help fix issues. Please don't be offended if project admins delete such comments. | ||
|
||
Please [react to comments with emoji][github-reaction] instead of. | ||
|
||
### Use English AMAP | ||
|
||
For non-native English speakers, please communicate in English as much as possible. | ||
It is recommended to use [DeepL Translator](https://www.deepl.com/translator). | ||
|
||
## Before making a Pull Request | ||
|
||
Read below links before making any contributions. | ||
|
||
- [Developer Certificate of Origin](./doc/dev/dco.md) | ||
- [Code Styles](./doc/dev/code-styles.md) | ||
- [Git Message Style](./doc/dev/git-message.md) | ||
- [Test](./doc/dev/test.md) | ||
|
||
## Make a Pull Request | ||
|
||
All PRs should follow below conditions. | ||
|
||
- [ ] Git message is [valid](./doc/dev/git-message.md). | ||
- [ ] Code style lint pass. | ||
- [ ] Test cases all passed without errors. | ||
- [ ] Squash one Git commit per PR. | ||
- [ ] All git commits follow the [DCO](./doc/dev/dco.md). | ||
|
||
|
||
<!-- Links --> | ||
|
||
[issue]: https://github.com/adoyle-h/one.nvim/issues | ||
[discussion]: https://github.com/adoyle-h/one.nvim/discussions | ||
[PR]: https://github.com/adoyle-h/one.nvim/pulls | ||
[github-reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/ |
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,58 @@ | ||
# Contributing | ||
|
||
## 提建议,修 Bug,做贡献 | ||
|
||
欢迎提供任何建议或者意见。 | ||
|
||
**在创建新的 Issue/Discussion/PR 之前,你必须先搜索相关 [Issue][]/[Discussion][]/[PR][]**,避免创建重复的链接。 | ||
|
||
- 请求新功能。请开一个 [discussion][],简短且清晰地描述你的需求。 | ||
- 提交新功能。请开一个 [PR][],简短且清晰地描述你的需求和设计。 | ||
- 报告 BUG。请开一个 [issue][],简短且清晰地描述你发现的问题。 | ||
- 修复 BUG。请开一个 [PR][],简短且清晰地描述你修了什么。 | ||
- 提问和建议。请开一个 [discussion][]。 | ||
- 其他上面未提到的内容,请开一个 [discussion][] 来讨论。 | ||
|
||
### 禁止 +1 | ||
|
||
不要发重复或无用的内容,比如 `+1`,`哈哈`,`附议`,`我希望这问题能够得到修复`,`这问题啥时候修好?`。 | ||
|
||
这样的评论无助于问题的解决。如果项目管理员删除了此类评论,请别生气。 | ||
|
||
请[贴 emoji 标签反馈到评论上](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)。 | ||
|
||
### 尽量用英文 | ||
|
||
对于非英语母语的人,请尽可能使用英语交流。 | ||
推荐使用 [DeepL Translator](https://www.deepl.com/translator)。 | ||
|
||
你也可以使用中文反馈意见。不过希望你尽可能使用英文。 | ||
因为我们处于国际社区,英文更通用,方便外国人阅读理解你的意见。 | ||
注意不要中英文混杂(专业词汇除外),请写完整的英文或中文语句。 | ||
|
||
## 创建 Pull Request 之前 | ||
|
||
在做贡献之前,请阅读以下链接。 | ||
|
||
- [Developer Certificate of Origin](./doc/dev/dco.md) | ||
- [Code Styles](./doc/dev/code-styles.md) | ||
- [Git Message Style](./doc/dev/git-message.md) | ||
- [Test](./doc/dev/test.md) | ||
|
||
## 创建 Pull Request | ||
|
||
所有 PR 必须遵守以下条件。 | ||
|
||
- [ ] Git message 必须[有效](./doc/dev/git-message.md)。 | ||
- [ ] 代码风格检查通过。 | ||
- [ ] 测试案例全部通过,无 error。 | ||
- [ ] 每个 PR 只有一个 Git commit。 | ||
- [ ] 所有 git commit 都已签署 [DCO](./doc/dev/dco.md)。 | ||
|
||
|
||
<!-- Links --> | ||
|
||
[issue]: https://github.com/adoyle-h/one.nvim/issues | ||
[discussion]: https://github.com/adoyle-h/one.nvim/discussions | ||
[PR]: https://github.com/adoyle-h/one.nvim/pulls | ||
[github-reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/ |
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
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
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,20 @@ | ||
# Code Styles | ||
|
||
## First of all | ||
|
||
- Your IDE must support [editorconfig](http://editorconfig.org/) and recognize the [`.editorconfig`](./.editorconfig) file in project. | ||
- All code and text must be written in English. | ||
|
||
## File naming | ||
|
||
All file names must match the regex `[a-z0-9-_]`, except `Dockerfile` and other particular files. | ||
|
||
## Shell script code styles | ||
|
||
- `[[ ... ]]` is preferred over `[ ... ]`, `test` and `/usr/bin/[`. | ||
- Function declaration `func() {...}` is preferred over `function func() {...}`. | ||
- Read-only Variables. Use `readonly` or `declare -r` to ensure they're read only. | ||
- Local Variables. Declare function-specific variables with `local`. Declaration and assignment should be on different lines. | ||
- Use `$(command)` instead of backticks. | ||
- `eval` should be avoided in most scenarios. | ||
- Constants and environment variable names must be all caps, separated with underscores. |
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,89 @@ | ||
# Developer Certificate of Origin | ||
|
||
The project uses a mechanism known as a Developer Certificate of Origin (DCO) to manage process. | ||
|
||
A DCO is a lightweight way for a developer to certify that they wrote or otherwise have the right | ||
to submit code or documentation to a project. The way a developer does this is by adding | ||
a Signed-off-by line to a commit. When they do this they are agreeing to the DCO. | ||
|
||
The full text of the DCO can be found at https://developercertificate.org . It reads: | ||
|
||
``` | ||
Developer Certificate of Origin | ||
Version 1.1 | ||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
1 Letterman Drive | ||
Suite D4700 | ||
San Francisco, CA, 94129 | ||
Everyone is permitted to copy and distribute verbatim copies of this | ||
license document, but changing it is not allowed. | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. | ||
``` | ||
|
||
If you are willing to agree to these terms, you just add a line to every git commit message: | ||
|
||
``` | ||
Signed-off-by: Some Developer somedev@example.com | ||
``` | ||
|
||
If you set your user.name and user.email as part of your git configuration, | ||
you can sign your commit automatically with `git commit -sS`. | ||
|
||
An example signed commit message might look like: | ||
|
||
``` | ||
An example commit message | ||
Signed-off-by: Some Developer somedev@example.com | ||
``` | ||
|
||
If more than one person works on something it’s possible for more than one person to sign off on it. For example, | ||
|
||
``` | ||
An example commit message | ||
Signed-off-by: Some Developer somedev@example.com | ||
Signed-off-by: Another Developer anotherdev@example.com | ||
``` | ||
|
||
|
||
See `git help commit`, | ||
|
||
``` | ||
-s, --signoff | ||
Add Signed-off-by line by the committer at the end of the commit log message. The meaning of a signoff depends on the | ||
project, but it typically certifies that committer has the rights to submit this work under the same license and | ||
agrees to a Developer Certificate of Origin (see http://developercertificate.org/ for more information). | ||
-S[<keyid>], --gpg-sign[=<keyid>] | ||
GPG-sign commits. The keyid argument is optional and defaults to the committer identity; if specified, it must be | ||
stuck to the option without a space. | ||
``` |
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,55 @@ | ||
# Git Commit Message Style | ||
|
||
Generally follows the [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
## Commit Message Format | ||
|
||
``` | ||
<type>[(scope)][!]: <description> | ||
[optional body] | ||
[optional footer] | ||
``` | ||
|
||
`[(scope)]` is optional. | ||
|
||
## Type | ||
|
||
Must be one of the following: | ||
|
||
- **build**: Changes that affect the build system or external dependencies | ||
- **ci**: Changes to our CI configuration files and scripts | ||
- **docs**: Documentation only changes | ||
- **feat**: A new feature | ||
- **fix**: A bug fix | ||
- **perf**: A code change that improves performance | ||
- **refactor**: A code change that neither fixes a bug nor adds a feature | ||
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) | ||
- **test**: Adding missing tests or correcting existing tests | ||
- **chore**: Other changes that don't modify src or test files | ||
|
||
|
||
## Breaking Change | ||
|
||
Commit message with optional `!` to draw attention to breaking change. | ||
|
||
``` | ||
chore!: drop Node 6 from testing matrix | ||
BREAKING CHANGE: dropping Node 6 which hits end of life in April | ||
``` | ||
|
||
A commit that has the text `BREAKING CHANGE:` at the beginning of its optional body or footer section | ||
introduces a breaking API change (correlating with MAJOR in semantic versioning). | ||
A BREAKING CHANGE can be part of commits of any type. | ||
|
||
## Sign the DCO for PR | ||
|
||
Please sign our Developer Certificate of Origin (DCO) before sending pull requests. For any code changes to be accepted, the DCO must be signed. It's very simple. See [this document](./dco.md). | ||
|
||
## Squash git commits for PR | ||
|
||
Each Pull Request should do one thing in only one commit. | ||
|
||
You can use `git rebase -i` to squash some commits into one. |
File renamed without changes.
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