1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

docs(CONTRIBUTING): add some real examples of scopes

It became apparent in #3574 that it's not clear what scope should be.

Added `CONTRIBUTING` as suggested by @Diadlo.
Added `build` as suggested by @initramfs.

Also improve formatting of the file, so that it will conform to <=80
chars per line for markdown.
This commit is contained in:
Zetok Zalbavar 2016-08-05 10:18:54 +01:00
parent 47153b3d77
commit b55933281f
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -77,9 +77,11 @@ The **header** is mandatory and the **body** is optional. The **scope** of the
header is also optional. header is also optional.
### Header ### Header
The header must be a short (72 characters or less) summary of the changes made. The header must be a short (72 characters or less) summary of the changes made.
#### Type #### Type
Must be one of the following: Must be one of the following:
* **feat**: A new feature * **feat**: A new feature
@ -87,8 +89,8 @@ Must be one of the following:
* **docs**: Documentation only changes * **docs**: Documentation only changes
* **style**: Changes that do not affect the meaning of the code (white-space, * **style**: Changes that do not affect the meaning of the code (white-space,
formatting, etc), but change the style to a more appropriate one formatting, etc), but change the style to a more appropriate one
* **refactor**: A code change that only improves code readability * **refactor**: A code change that only improves code readability and reduces
and reduces complexity, without changing any functionality complexity, without changing any functionality
* **perf**: A code change that improves performance * **perf**: A code change that improves performance
* **revert**: Reverts a previous commit * **revert**: Reverts a previous commit
* **test**: Adding missing tests * **test**: Adding missing tests
@ -96,19 +98,36 @@ Must be one of the following:
as documentation generation as documentation generation
##### Revert ##### Revert
If the commit reverts a previous commit, it should begin with `revert: `, If the commit reverts a previous commit, it should begin with `revert: `,
followed by the header of the reverted commit. In the body it should say: followed by the header of the reverted commit. In the body it should say:
`Revert commit <hash>.`, where the hash is the SHA of the commit being reverted. `Revert commit <hash>.`, where the hash is the SHA of the commit being
reverted.
#### Scope #### Scope
The scope could be anything specifying place of the commit change. For example
`$location`, `$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, The scope could be anything specifying place of the commit change. Note that
`ngView`, etc. "place" doesn't necessarily mean location in source code.
For example:
* `audio` change affects audio
* `video` change affects video
* `settings` change affects qTox settings
* `chatform`
* `tray` change affects tray icon
* `l10n` translation update
* `i18n` something has been made translatable
* `build` change affects build system / scripts, e.g. `qtox.pro`,
`simple_make.sh`, etc.
* `travis` change affects Travis CI
* `CONTRIBUTING` change to the contributing guidelines
Since people were abusing length of the scope, it's limited to 12 characters. Since people were abusing length of the scope, it's limited to 12 characters.
If you're running into the limit, you're doing it wrong. If you're running into the limit, you're doing it wrong.
#### Subject #### Subject
The subject contains succinct description of the change: The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes" * use the imperative, present tense: "change" not "changed" nor "changes"
@ -121,16 +140,18 @@ following sentence:
> If applied, this commit will ___your subject line here___ > If applied, this commit will ___your subject line here___
### Body ### Body
Wrap the body at 72 characters whenever possible (for example, don't modify long
links to follow this rule). Just as in the **subject**, use the imperative, Wrap the body at 72 characters whenever possible (for example, don't modify
present tense: "change" not "changed" nor "changes". The body should include the long links to follow this rule). Just as in the **subject**, use the
motivation for the change and contrast this with previous behavior. imperative, present tense: "change" not "changed" nor "changes". The body
should include the motivation for the change and contrast this with previous
behavior.
The body contains (in order of appearance): The body contains (in order of appearance):
* A detailed **description** of the committed changes. * A detailed **description** of the committed changes.
* References to GitHub issues that the commit **closes** (e.g., `Closes #000` or * References to GitHub issues that the commit **closes** (e.g., `Closes #000`
`Fixes #000`). or `Fixes #000`).
* Any **breaking changes**. * Any **breaking changes**.
Include every section of the body that is relevant for your commit. Include every section of the body that is relevant for your commit.
@ -162,6 +183,7 @@ git config --global commit.gpgsign true
Use `C++11`. Use `C++11`.
## Coding style ## Coding style
```C++ ```C++
function() function()
{ {
@ -204,9 +226,9 @@ E.g. https://github.com/qTox/qTox/blob/master/src/misc/flowlayout.cpp
## Documentaion ## Documentaion
If you added a new function, also add a doxygen comment before the implementation. If you added a new function, also add a doxygen comment before the
If you changed an old function, make sure the doxygen comment is still correct. implementation. If you changed an old function, make sure the doxygen comment
If it doesn't exist add it. is still correct. If it doesn't exist add it.
Don't put docs in .h files, if there is a corresponding .cpp file. Don't put docs in .h files, if there is a corresponding .cpp file.
@ -266,6 +288,7 @@ someWidget->setTooltip(
## Limitations ## Limitations
### Filesystem ### Filesystem
Windows' unbeaten beauty and clarity: Windows' unbeaten beauty and clarity:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx