Provide commit message format for Coverity defects

Provide details about the commit message format for Coverity defect
fixes submitted.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes #6771
This commit is contained in:
Giuseppe Di Natale 2017-10-23 09:47:16 -07:00 committed by Brian Behlendorf
parent d5e024cba2
commit 70c8a79446
1 changed files with 45 additions and 11 deletions

View File

@ -27,6 +27,8 @@ started?](#what-should-i-know-before-i-get-started)
* [Commit Message Formats](#commit-message-formats) * [Commit Message Formats](#commit-message-formats)
* [New Changes](#new-changes) * [New Changes](#new-changes)
* [OpenZFS Patch Ports](#openzfs-patch-ports) * [OpenZFS Patch Ports](#openzfs-patch-ports)
* [Coverity Defect Fixes](#coverity-defect-fixes)
* [Signed Off By](#signed-off-by)
Helpful resources Helpful resources
@ -167,18 +169,10 @@ first line in the commit message.
please summarize important information such as why the proposed please summarize important information such as why the proposed
approach was chosen or a brief description of the bug you are resolving. approach was chosen or a brief description of the bug you are resolving.
Each line of the body must be 72 characters or less. Each line of the body must be 72 characters or less.
* The last line must be a `Signed-off-by:` tag with the developer's * The last line must be a `Signed-off-by:` tag. See the
name followed by their email. This is the developer's certification [Signed Off By](#signed-off-by) section for more information.
that they have the right to submit the patch for inclusion into
the code base and indicates agreement to the [Developer's Certificate
of Origin](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin).
Code without a proper signoff cannot be merged.
Git can append the `Signed-off-by` line to your commit messages. Simply An example commit message for new changes is provided below.
provide the `-s` or `--signoff` option when performing a `git commit`.
For more information about writing commit messages, visit [How to Write
a Git Commit Message](https://chris.beams.io/posts/git-commit/).
An example commit message is provided below.
``` ```
This line is a brief summary of your change This line is a brief summary of your change
@ -223,3 +217,43 @@ Provide some porting notes here if necessary.
OpenZFS-issue: https://www.illumos.org/issues/1234 OpenZFS-issue: https://www.illumos.org/issues/1234
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/abcd1234 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/abcd1234
``` ```
#### Coverity Defect Fixes
If you are submitting a fix to a
[Coverity defect](https://scan.coverity.com/projects/zfsonlinux-zfs),
the commit message should meet the following guidelines:
* Provides a subject line in the format of
`Fix coverity defects: CID dddd, dddd...` where `dddd` represents
each CID fixed by the commit.
* Provides a body which lists each Coverity defect and how it was corrected.
* The last line must be a `Signed-off-by:` tag. See the
[Signed Off By](#signed-off-by) section for more information.
An example Coverity defect fix commit message is provided below.
```
Fix coverity defects: CID 12345, 67890
CID 12345: Logically dead code (DEADCODE)
Removed the if(var != 0) block because the condition could never be
satisfied.
CID 67890: Resource Leak (RESOURCE_LEAK)
Ensure free is called after allocating memory in function().
Signed-off-by: Contributor <contributor@email.com>
```
#### Signed Off By
A line tagged as `Signed-off-by:` must contain the developer's
name followed by their email. This is the developer's certification
that they have the right to submit the patch for inclusion into
the code base and indicates agreement to the [Developer's Certificate
of Origin](https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin).
Code without a proper signoff cannot be merged.
Git can append the `Signed-off-by` line to your commit messages. Simply
provide the `-s` or `--signoff` option when performing a `git commit`.
For more information about writing commit messages, visit [How to Write
a Git Commit Message](https://chris.beams.io/posts/git-commit/).