FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


styleguide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
styleguide [2019/11/07 20:45]
jfduval [thisFile.c]
styleguide [2019/11/07 20:47] (current)
jfduval
Line 9: Line 9:
   * As a general rule, make sure that your code looks clean and similar to the existing code (when existing code is provided). More examples below.   * As a general rule, make sure that your code looks clean and similar to the existing code (when existing code is provided). More examples below.
   * In your comments, start sentences with capital letters. Put a space between the <​nowiki>//</​nowiki>​ and the text.   * In your comments, start sentences with capital letters. Put a space between the <​nowiki>//</​nowiki>​ and the text.
-    * Good: <color #​22b14c><​nowiki>//​ That's a good comment</​nowiki></​color>​+    * Good: <color #​22b14c><​nowiki>//​That'​s a good comment</​nowiki></​color>​
     * Bad: <color #​ed1c24><​nowiki>//​ this isn'​t</​nowiki></​color>​     * Bad: <color #​ed1c24><​nowiki>//​ this isn'​t</​nowiki></​color>​
-    * Bad: <color #​ed1c24><​nowiki>//​This isn'​t</​nowiki></​color>​ 
   * Always include a comment above a function declaration that explains its purpose.   * Always include a comment above a function declaration that explains its purpose.
   * Always mention in what file extern variables are declared.   * Always mention in what file extern variables are declared.
Line 34: Line 33:
  
 <​code>​ <​code>​
-// Description of the function+//​Description of the function
 void my_function(void) void my_function(void)
 { {
-     // My Code+     //My Code
 } }
 </​code>​ </​code>​
Line 44: Line 43:
  
 <​code>​void my_function(void){ <​code>​void my_function(void){
-// My Code+//My Code
 }</​code>​ }</​code>​
  
styleguide.txt ยท Last modified: 2019/11/07 20:47 by jfduval