Browse code

CONTRIBUTING.md: note about formatting the code

- use clang-format or match the style of the existing component

Daniel-Constantin Mierla authored on 09/02/2018 12:52:58
Showing 1 changed files
... ...
@@ -31,6 +31,7 @@ In order to be easily able to track the changes and have a coherent ChangLog
31 31
 and commit history, there are several *rules* required for each contribution.
32 32
 
33 33
 ## Contributing Code Or Content ##
34
+
34 35
 ### Basic Rules ###
35 36
 
36 37
   * github pull requests are the favourited mechanism to submit contributions
... ...
@@ -47,7 +48,7 @@ and commit history, there are several *rules* required for each contribution.
47 47
     * a module (code inside subfolder modules/)
48 48
     * a tool (code inside subfolder utils/)
49 49
     * an example or main configs (files inside subfolders etc/ or examples/)
50
-  * commit messages **should** be formatted as specified in the next section
50
+  * commit messages **has to be formatted** as specified in the next section
51 51
   * commit message must describe the changes done by the patch
52 52
     * other details (e.g., how to reproduce, backtrace, sip packets, ...) belong
53 53
     to content (comments) of the pull request
... ...
@@ -73,6 +74,9 @@ and commit history, there are several *rules* required for each contribution.
73 73
     likely to rise merge conflicts. With separate commit, that won't be
74 74
     backported, only the commit to xml doc file, then README will be manually
75 75
     regenerated in the corresponding branch.
76
+  * code **should** be formatted with **clang-format** or to match the style of
77
+  the component that the commit applies to. The `.clang-format` file is part of
78
+  Kamailio source code tree, in the root folder.
76 79
 
77 80
 
78 81
 ### Commit Message Format ###
... ...
@@ -89,12 +93,12 @@ as "Subject" in the generated commit emails and it will also be used when
89 89
 generating the Changelog (e.g. git log --pretty=oneline).
90 90
 
91 91
 Please start always with the prefix of the component (subsystem) that is modified by the commit, for example:
92
-  * core: typo fixes to log messages
93
-  * tcp: stun fixes
94
-  * mem: added faster malloc
95
-  * module_name: support for foo rfc extension
96
-  * lib_name: critical bug fix for abc case
97
-  * kamctl: added support for management of module xyz
92
+  * `core`: typo fixes to log messages
93
+  * `tcp`: stun fixes
94
+  * `mem`: added faster malloc
95
+  * `module_name`: support for foo rfc extension
96
+  * `lib_name`: critical bug fix for abc case
97
+  * `kamctl`: added support for management of module xyz
98 98
 
99 99
 #### Examples Of Commit Messages ####
100 100