File: CometCodingStyleGuidelines.txt

package info (click to toggle)
comet-ms 2014022-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,784 kB
  • sloc: cpp: 10,589; makefile: 73; sh: 13
file content (32 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Coding style guidelines for the Comet project:


A. Use Allman brace style (credited to Eric Allman).  Code brace blocks are placed
   one line below their respective structures and at the same identation level.

   if (condition_variable==condition1)
   {
      //Some code.
      condition_variable=condition2;
   }
   else if (condition_variable==condition2)
   {
      //Some code.
      condition_variable=condition1;
   }
   else
   {
      //Some code
      condition_variable=false;
   }

B. Use spaces for indentation, not tab characters.

C. The normal indentation is 3 spaces per logical level.

D. Avoid trailing whitespace.

E. Use Unix-style carriage returns ("\n") rather than Windows ones ("\r\n").

F. Use '//' for comments.  This allows one to comment out large blocks of code,
   including these local comments, using /* */.