Merge branch 'jk/doc-coding-guideline'

Elaborate on a style niggle that has been part of "mimic existing
code".

* jk/doc-coding-guideline:
  CodingGuidelines: mention C whitespace rules
maint
Junio C Hamano 2014-03-14 14:26:55 -07:00
commit 2b66d315bb
1 changed files with 11 additions and 0 deletions

View File

@ -126,6 +126,17 @@ For C programs:
"char * string". This makes it easier to understand code
like "char *string, c;".

- Use whitespace around operators and keywords, but not inside
parentheses and not around functions. So:

while (condition)
func(bar + 1);

and not:

while( condition )
func (bar+1);

- We avoid using braces unnecessarily. I.e.

if (bla) {