diff options
Diffstat (limited to 'CONTRIBUTING.md')
| -rw-r--r-- | CONTRIBUTING.md | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7bfff05564..6c7066c087 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,33 +82,36 @@ a comment. ### Commit messages Follow the [conventional commits guidelines][conventional_commits] to *make reviews easier* and to make -the VCS/git logs more valuable. The general structure of a commit message is: - -``` -<type>([optional scope]): <description> - -[optional body] - -[optional footer(s)] -``` +the VCS/git logs more valuable. The structure of a commit message is: + + type(scope): subject + + Problem: + ... + + Solution: + ... + +- Commit message **subject** (you can **ignore this for "fixup" commits** or any commits you expect to be squashed): + - Prefix with a [_type_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json): + - `build ci docs feat fix perf refactor revert test vim-patch` + - Append an optional `(scope)` such as `(lsp)`, `(treesitter)`, `(float)`, … + - Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug." + - Keep it short (under 72 characters). +- Commit message **body** (detail): + - Concisely describe the Problem/Solution in the commit **body**. [Describing the problem](https://lamport.azurewebsites.net/pubs/state-the-problem.pdf) + _independently of the solution_ often leads to a better understanding for you, reviewers, and future readers. + ``` + Problem: + + Solution: + ``` +- Indicate breaking API changes with "!" after the type, and a "BREAKING CHANGE" footer. Example: + ``` + refactor(provider)!: drop support for Python 2 -- Prefix the commit subject with one of these [_types_](https://github.com/commitizen/conventional-commit-types/blob/master/index.json): - - `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `test`, `vim-patch` - - You can **ignore this for "fixup" commits** or any commits you expect to be squashed. -- Append optional scope to _type_ such as `(lsp)`, `(treesitter)`, `(float)`, … -- _Description_ shouldn't start with a capital letter or end in a period. -- Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug." -- Try to keep the first line under 72 characters. -- A blank line must follow the subject. -- Breaking API changes must be indicated by - 1. "!" after the type/scope, and - 2. a "BREAKING CHANGE" footer describing the change. - Example: - ``` - refactor(provider)!: drop support for Python 2 - - BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported. - ``` + BREAKING CHANGE: refactor to use Python 3 features since Python 2 is no longer supported. + ``` ### News |