Skip to content

Commit 2b66d31

Browse files
committed
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
2 parents 2669638 + f57b6cf commit 2b66d31

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Documentation/CodingGuidelines

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ For C programs:
126126
"char * string". This makes it easier to understand code
127127
like "char *string, c;".
128128

129+
- Use whitespace around operators and keywords, but not inside
130+
parentheses and not around functions. So:
131+
132+
while (condition)
133+
func(bar + 1);
134+
135+
and not:
136+
137+
while( condition )
138+
func (bar+1);
139+
129140
- We avoid using braces unnecessarily. I.e.
130141

131142
if (bla) {

0 commit comments

Comments
 (0)