From 917965483de7a9bcd236b2aa957dbd3cf1010e54 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 12 Jul 2015 17:32:35 +0200 Subject: [PATCH] doc: improve docs/02-contributing.md --- docs/02-contributing.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/02-contributing.md b/docs/02-contributing.md index 4043faa6..e0add404 100644 --- a/docs/02-contributing.md +++ b/docs/02-contributing.md @@ -14,26 +14,31 @@ Imitate the existing code style. For concrete rules: - Use 4 spaces indentation, do not use tabulator characters; - Place braces alone on new lines, and do not place braces for single - line statement where it is not needed, i.e. no: + line statement where it is not needed, i.e.: - if(bla) { + if(foo) x = 1; + + if(foo) + { + x = 1; + bar(); } - Do not put a space after if, for, while or function call statements; - - The preferred line length is 80 characters; + - The preferred maximum line length is 80 characters; - Use `/* */` for comments; - - Use the API: there's a list of `a_*()` functions you should use instead + - Use the API: there is a list of `a_*()` functions you should use instead of the standard libc ones. There is also a common API for linked lists, tabulars, etc.; - Be *clear* in what you do; - - Prefix your function name with the module they are enhancing, - i.e. if you add a function to manipulate a tag prefix it with `tag_`; + - Prefix your function names with the module they are enhancing, + i.e. if you add a function to manipulate a tag, prefix it with `tag_`; - Write documentation for any new functions, options, whatever.